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

How to update docker image

WJ
Release: 2020-06-08 17:00:31
Original
16746 people have browsed it

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
Copy after login

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
Copy after login

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

docker rmi [image id]
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template