I'm running a private docker registry. It works with docker login
followed by docker push
or docker pull
on both the manager as well as the workers.
However if a new worker joins the swarm it can't pull the images if a service is placed onto it.
So far I have tried the following things:
--with-registry-auth
when creating the services on the manager node.docker login
successfully at startup of worker nodes before joining the swarmAuth-Header
on the worker following this instruction from classicswarmNone of which seem to work. The worker nodes still cant pull the images.
The registry always logs
error authorizing context: basic authentication challange for realm "Registry Realm": invalid authorization credentials
and returns a 401.
Does anyone have an idea on how to fix this or what the issue might be ?
When starting a stack on the manager node it can pull the images from the registry after setting the auth-header
like in the 3rd point.
Solved this issue by updating the swarm service with docker service update --with-registry-auth
.
For some reason --with-registry-auth
does not work with docker service create
.