-
Notifications
You must be signed in to change notification settings - Fork 342
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
docker build can't pull base image with this ecr-login helper? #9
Comments
@gengmao Thanks for reporting this. I did a little investigation and it looks like the Docker CLI uses the {
"credsStore":"ecr-login",
"auths": {
"123456789012.dkr.ecr.us-west-2.amazonaws.com": {
}
}
} As a workaround, you can adjust your |
Adding "auths" solved my problem. Thanks @samuelkarp! |
I know this is closed, but adding the |
@burdandrei In more-recent versions of Docker, the |
* add credentials helper * remove aws get-login * fix travis.yml * fix travis.yml * fix travis * specify deploy branch * exit immediately if error * fix pulling on build awslabs/amazon-ecr-credential-helper#9 * fix docker config * fix awslabs/amazon-ecr-credential-helper#9 * move credentials to before_install section * change deploy branch to master
This is not limited to docker compose and the solution of piping to the credential plugin seems less useful than the basic |
Encountered this issue today. Ended up using the |
Me too! Unfortunately, this change needs to be made in the Docker CLI itself rather than in this project. moby/moby#32967 looks stalled, but that's where the work would need to happen. |
For anyone still experiencing this issue, using the docker daemon with buildkit solves the problem. |
Hello,
I rolled out this ecr-login helper a few days ago, and I found
docker build
failed withunauthorized: authentication required
if the Dockerfile is FROM an image in ECR.This ecr-login helper works fine with docker pull. The error can be worked around by pulling the image before
docker build
, but if thedocker build
has an--pull
option, the build would failed with sameunauthorized: authentication required
error.I don't know the details of how
docker build
pulls an private image when needed - is this an simple implementation issue, or just any https://github.com/docker/docker-credential-helpers can't work withdocker build
?The text was updated successfully, but these errors were encountered: