Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerhub authentication... again #60

Closed
tinkerdudeno1 opened this issue Dec 15, 2021 · 3 comments · Fixed by #61
Closed

Dockerhub authentication... again #60

tinkerdudeno1 opened this issue Dec 15, 2021 · 3 comments · Fixed by #61
Labels
Milestone

Comments

@tinkerdudeno1
Copy link

I've scrolled through the closed issues and discovered that authentication against Dockerhub or private registries requires /root/.docker/config.json to be mounted. So I did:

  • docker login on every node of my swarm
  • Mount the aforementioned file into the container in the exact same location and make sure it's in the right place and readable
  • Add the WITH_REGISTRY_AUTH=true environment variable to the service

but I still get the toomanyrequests error from Dockerhub. When I docker pull on the cli of my nodes, everything is fine. Shepherd, however, does not seem to get the authentication straight. The log says

Send registry authentication details to swarm agents,

immediately followed by:

toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit,

which only happens when I pull unauthenticated in my company.

Is there anything else I can try?

Thanks in advance!

@djmaze
Copy link
Collaborator

djmaze commented Dec 27, 2021

@tinkerdudeno1 Sorry for the late reply. I just built a clean solution. If you are working on amd64 machines, could you try out the test image at mazzolino/shepherd:pr-61? And then set REGISTRY_USER and REGISTRY_PASSWORD as documented here.

Does that work for you?

@djmaze djmaze added the bug label Dec 27, 2021
@djmaze djmaze added this to the 0.6.0 milestone Dec 27, 2021
@krassdanke
Copy link

Hey, I had the same behavior but another error message (no crendetials at all).
When using mazzolino/shepherd:pr-61 and configuring REGISTRY_USER and REGISTRY_PASSWORD, it works.

Hope this helps!

@tinkerdudeno1
Copy link
Author

Sorry for the late reply myself. I was off work and have meanwhile worked around this issue by deploying a registry serving as a proxy to Dockerhub. The registry itself was logged into Dockerhub so Shepherd was able to pull images from Dockerhub via this registry just fine. Interestingly, this worked, even though it also required authentication.

But: I can also confirm that pr-61 works just fine. IMHO, it's a step in the right direction as to new users it's more straight-forward to configure registry credentials via env variables rather than relying on the system login status.

So thanks for your effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants