-
Notifications
You must be signed in to change notification settings - Fork 494
Cannot push to ECR #369
Comments
I know this is an old Issue, but I ran into this today with 1.4.13 and spent too much time troubleshooting it. TL;DR - updating .docker/config.json to use credsStore=ecr-login is easiest.
I use the AWS Tools for PowerShell, but I suspect we have a similar problem. To authenticate I run: My .docker/config.json was auto-generated when I logged in, with these contents after I deleted the file and let docker re-create it.
Pushing with this failed, so I ran maven with the -X flag for debug output and saw the call to Stepping through the plugin execution in an attached debug session I saw ConfigFileRegistryAuthSupplier.authFor try the https variant and fail because docker-credential-wincred doesn't have that registry, as confirmed with
Trying without the protocol works:
The plugin then tried without the protocol (yay!), but because config.json has a stub entry for that name DockerConfigReader.authForRegistry returned the empty object with no auth info and never reached the credsStore piece. These options don't work:
I believe these to be bugs:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is this a BUG REPORT or FEATURE REQUEST?:
Bug report
Description
Cannot push images to ECR. I've tried using 1.3.3 and using docker-client version 8.10 per this old issue, but neither can connect to my docker client.
How to reproduce
dockerfile.repository
per ECR's required structureaws ecr create-repository --repository-name "$(mvn help:evaluate "-Dexpression=dockerfile.repository" -q -DforceStdout)"
${ecr_name}
in the commandaws ecr get-login-password | docker login --username AWS --password-stdin "${ecr_name}"
mvn package
mvn dockerfile:push
- failsWhat do you expect
mvn dockerfile:push
succeeds wheneverdocker push
wouldWhat happened instead
push fails with error
Software:
docker version
:The text was updated successfully, but these errors were encountered: