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

Nomad-ECR pull issue #4776

Closed
nattvasan opened this issue Oct 12, 2018 · 3 comments
Closed

Nomad-ECR pull issue #4776

nattvasan opened this issue Oct 12, 2018 · 3 comments

Comments

@nattvasan
Copy link

Reference Issue : #4766

Likely not as the username/password is only valid for 12 hours
(https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html) that is why it is recommended to use the credential helper (https://aws.amazon.com/blogs/compute/authenticating-amazon-ecr-repositories-for-docker-cli-with-credential-helper/)

As per your comment to use 'docker-credential-ecr-login', I used and installed it successfully. But Nomad is still failing to pull.

Logs:

Recent Events:
Time Type Description
2018-10-11T10:18:19Z Alloc Unhealthy Unhealthy because of failed task
2018-10-11T10:18:19Z Not Restarting Error was unrecoverable
2018-10-11T10:18:19Z Driver Failure failed to initialize task "xxxx" for alloc "44395b24-95c3-7598-8758-e0ed2363a2e1": Failed to find docker auth for repo "xxxx.dkr.ecr.xxxx.amazonaws.com/xxx/xxxxx": exec: "docker-credential-ecr-login": executable file not found in $PATH

My docker config file:

{
"credHelpers": {
"XXXXX.dkr.ecr.us-XXXXXXX.amazonaws.com": "ecr-login"
},
}

Client config:

options {
    "docker.cleanup.image" = "false"
    "docker.auth.helper" = "ecr-login"
    "docker.auth.config" = "/etc/docker/config.json"
    "docker.privileged.enabled" = "true"

}

}

FYI : I'm able to pull images from ECR with docker pull command without using "docker login"

With the help of the comments posted in the issue #3526 , I was able to fix the PATH issue reported but now again i'm facing pull issue reported earlier in my first post.

Logs:

Time Type Description
2018-10-11T11:46:18Z Restarting Task restarting in 30.357619357s
2018-10-11T11:46:18Z Driver Failure failed to initialize task "ipvs" for alloc "0b6eafad-479e-5907-5580-c5af648b35f4": Failed to pull XXXXXXXXXX.dkr.ecr.us-XXX.amazonaws.com/XXXX/XXXX: API error (404): {"message":"repository XXXXXXX.dkr.ecr.us-XXXX.amazonaws.com/XXXXX/XXXX not found: does not exist or no pull access"}

Thank you.

Originally posted by @nattvasan in #4766 (comment)

@dadgar
Copy link
Contributor

dadgar commented Oct 12, 2018

No need for two issues regarding the same thing. Closing this in favor of the original

@dadgar dadgar closed this as completed Oct 12, 2018
@nattvasan
Copy link
Author

I was about to Close the old one.! no problem, will check for updates in old case !

@github-actions
Copy link

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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants