-
Notifications
You must be signed in to change notification settings - Fork 2k
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
How to debug "Failed to find docker auth for repo"? #7357
Comments
Just for additional context - I'm using a systemd service, and what I'm finding particularly difficult to understand is that if I change my nomad service to do this:
the output is a valid response:
How can I see the exact format of what Nomad is actually doing / what environment the job is actually seeing? |
My 'fix' for this has been giving /root/ an .aws folder with credentials (and specifying $HOME in systemd service config), but this should not really be necessary if I can specify the AWS environment variables Also seems notable that most of the other issues similar to this have just been ignored and closed? |
Hi @davidr912!
Nomad doesn't run Docker commands like a shell; it uses the Docker API. You're seeing the logs that bubble up from that API in the docker task driver. That being said, some of the auth helpers do call out to external command (ex The auth process goes through some task-specific configuration, then the Docker config, then the helper config (see More places to debug:
Oh? Sorry about that, can you link the ones you found so I can close them up? |
@davidr912 it's better to expose environment variables in your systemd service for nomad |
Hey there Since this issue hasn't had any activity in a while - we're going to automatically close it in 30 days. If you're still seeing this issue with the latest version of Nomad, please respond here and we'll keep this open and take another look at this. Thanks! |
I am having the same trouble with Nomad v1.0.1 (c9c68aa).
From that message it seems the entire image path is being passed in as the repo. The correct way to call
The
client.hcl:
/etc/docker.config.json:
|
I resolved the issue by removing lines from the systemd service file for nomad. I was attempting to set the AWS variables inside nomad.service like so:
It turns out that is not the correct way to set env vars. The quoting is off as explained in this answer. Setting those in |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
Nomad v0.10.4 (f750636ca68e17dcd2445c1ab9c5a34f9ac69345)
Operating system and Environment details
Linux, Ubuntu 18.04
Issue
I'm receiving "Failed to find docker auth for repo" and I'm using
docker-credential-ecr-login
/etc/docker-auth.json
withcredHelpers
specified in format<repo>: ecr-login
client.hcl
:What I'm looking for mostly is how to debug this? Even at DEBUG log level the server and client do not log anything about what command they are actually running, or the user they run it as
Is there some way I can get this detail?
(I suspect this detail will help me because executing
<repo> | docker-credential-ecr-login get
as a regular user successfully authenticates)The text was updated successfully, but these errors were encountered: