Docker Community Forums

Share and learn in the Docker community.

Docker pull and docker restart


(Bill Wang) #1

I’d like to understand how these two commands work.

docker pull <image-1:stable>
docker restart <container>

I have two questions in fact.

  1. Supposed I have run the container from image-1:stable. Then someone push an update to that image.

When run docker pull, the host will get the updated image.

My question is, will docker restart (or stop/start) get the updated image directly, or I have to remove (docker rm) the exist running container and start a totally new container with update image?

  1. The exist docker container running with folder mounted. If I update the config file in that folder, and restart the container, will the container get new setting directly? Do I have to remove and start a new container?

(Danielpops) #2

+1 I also have the same question


(Danielpops) #3

Actually this answers it: https://serverfault.com/questions/745244/does-docker-restart-use-the-latest-image-or-the-one-the-container-was-created-wi