3

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.
  • ran docker login successfully at startup of worker nodes before joining the swarm
  • creating a Auth-Header on the worker following this instruction from classicswarm

None 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.

Alexander
  • 155
  • 13

2 Answers2

0

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.

Alexander
  • 155
  • 13
-1
docker logout hub-host
docker login hub-host
leftjoin
  • 36,950
  • 8
  • 57
  • 116