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!