-
Notifications
You must be signed in to change notification settings - Fork 41k
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
Build image fails when builder registry requires authentication with a credential helper #44633
Comments
Thanks for raising this. The title suggests that authenticating with a builder registry doesn't work at all. As far as we know, that's not the case. Your description reads like the problem only occurs when using a credential helper. Does that match what you're experiencing? |
Hello @wilkinsona, sorry about the confusion. I also tried with
I don't know if the different error is due to a difference in docker login vs credential helper or because I'm using a different registry here (dockerhub, as I don't have an account where I can docker login on ecr), but the end result is the same. |
If you have pulled the image beforehand, you could workaround by setting the I guess the existing authentication options are no help because you don't have a username / password / token? |
Even with a valid username / password they are not used for pulling the builder, as mentioned in the docs they are only used for publishing. I tried anyway and it doesn't work.
This is a valid workaround, although it introduces fragilities into the build and doesn't guarantee the builder is fresh, which has security concerns. |
I can't find the section where it mentions that the credentials are not used when pulling the builder.
I haven't read the code, but this reads like authenticating when pulling builder images is possible. Did you try
? |
Apologies, I was misremembering the documentation and only taking into consideration @wilkinsona you were correct, the issue only sussists when using a credential helper. |
Running
spring-boot:build-image
fails when the builder configured in thespring-boot-maven-plugin
is not in a public repository, with message:Docker is configured with a credential helper (ecr-login + aws sso login for me) so docker pull/push work fine, but I suspect that direct API calls to the socket don't interact with the credential helper. Using docker login also doesn't work, nor does pulling the image beforehand.
pack build
works fine, but I'd rather use a maven plugin than coordinate the build between maven and an external tool.I need a different builder because of #43716.
Possibly related to #25898.
Steps to reproduce:
credHelpers
section of.docker/config.json
)mvn spring-boot:build-image
The text was updated successfully, but these errors were encountered: