Docker Swarm can't download images automatically from privat registry

3.5k views Asked by At

I'm using a Docker Swarm to run my application stack, most of my images are coming from a private docker registry I host myself (Gitlab CI integration). The problem now is that my swam nodes do not automatically pull the image from the registry I append in my docker-compose.yaml ... Instead I have to manually pull them on each node before I can start my stack using docker stack deploy.

Is there any reason for this behavior? Manually pulling the images is not problem at all so to me this does not look like a authentication problem. To me it looks like that its simply not implemented in docker swarm ?!?

Any idea?

1

There are 1 answers

1
Mahmoud Roshdy On BEST ANSWER

Check the answer below just you need to pass --with-registry-auth with docker stack deploy

https://forums.docker.com/t/docker-stack-and-private-registry/27744