Home >Operation and Maintenance >Docker >How to update docker image

How to update docker image

WJ
WJOriginal
2020-06-08 17:00:3116758browse

How to update docker image

How to update docker image?

Whenever the remote image is updated, first pull it to the local

docker pull gogs/gogs

docker images. There will be two images with the same name, one with the tag latest and one with the tag none

Update script

#!/bin/shdocker rm -f gogs
docker run --name=gogs -d -p 3022:22 -p 3000:3000 -v /home/docker/gogs:/data gogs/gogs

After the execution is completed, find the image ID with the tag none and delete it manually:

docker rmi [image id]

Related recommendations: docker tutorial

The above is the detailed content of How to update docker image. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn