I have run through the docker 'Get Started' tutorial (https://docs.docker.com/get-started/part6/) and have also followed the all the instructions with my own application and AWS. I used the wrong image in my service
definition in my docker-compose.yml file. I have corrected the docker-compose.yml file and have tried to run docker stack deploy
but I get the following and the nothing happens on the swarm. Is there something I can do to get the swarm to use the correct image or do I need to start from scratch?
[myapp-swarm] ~/PycharmProjects/myapp $ docker stack deploy -c
docker-compose.yml myapp
Updating service myservice_web (id: somerandomidstring)
image my_user/myprivaterepo:myapptag could not be accessed on a registry to record
its digest. Each node will access my_user/myprivaterepo:myapptag independently,
possibly leading to different nodes running different versions of the image.
When updating services that need credentials to pull the image, you need to pass --with-registry-auth
. Images pulled for a service take a different path than a regular docker pull, because the actual pull is performed on each node in the swarm where an instance is deployed. To pull an image, the swarm cluster needs to have the credentials stored (so that the credentials can be passed on to the node it performs the pull on).
Can you confirm if passing --with-registry-auth
makes the problem go away?