-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
spring-boot-maven-plugin:build-image fails on Docker Desktop / Windows due missing authentication #36671
Comments
The Spring Boot plugin and the
The linked issue is related to Docker repositories that require authentication in order to pull images. That's not the case here, as the Paketo builder repository is a sponsored OSS repo that does not require authentication and is not subject to rate limiting. It's a proxy that is requiring authentication, not the repository.
Have some proxy configuration been applied to the Docker CLI? There are no options on the Spring Boot build plugins to configure a proxy. There are configuration options that tell the plugins how to talk to the Docker daemon process, but that is different from the Docker daemon talking to a repository. Can you try some of the options documented by Docker here and here to configure the daemon for proxy? |
@scottfrederick thank you for looking into this issue!
That is correct, but our corporate proxy does not require authentication. I've configured the proxy for the daemon according to the docker docs in {
"proxies": {
"http-proxy": "http://proxy.mycorp.com:80",
"https-proxy": "http://proxy.mycorp.com:80",
"no-proxy": "*.mycorp.com,mycorp.com"
}
} I still think it is related to missing authentification for docker.io: If I'm using the Docker CLI and do a "docker logout" and then performing a docker pull, this then also fails:
The error message for docker pull looks exactly the same as the error, when the maven plugin tries to pull this image:
After performing the If I'm configuring authentication for the builderRegistry directly in plugin configuration, it starts to work! <plugin>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<docker>
<builderRegistry>
<username>my_dockerhub_user</username>
<password>my_dockerhub_pat</password>
<url>https://index.docker.io/v1/</url>
<email>my_dockerhub_email</email>
</builderRegistry>
</docker>
<!-- ... ---> So It seems to me that docker.io requires auth - also for sponsored OSS images? Not sure if this is a maven plugin related issue then, but maybe this can be added to the docs? Or #25898 comes back into play, as this would get the authentication from my local |
This is not the case. I have Docker Engine and Docker Desktop on Linux, and I can pull the Paketo builder images while logged out with both of those Docker daemons. Spring Boot has CI infrastructure that pulls Paketo images without authentication also. The flow here is: Docker client (CLI or Boot plugins) using the Docker Engine API -> Docker deamon (Docker Desktop in your case) at I believe the message You could test this theory by using the Docker CLI or the Boot plugins to pull an image from a different repository to see if that changes anything. I don't know what would cause Docker Desktop on Windows to require any call to the Docker Engine API to be authenticated, but that appears to be what's going on. |
Apparently Docker Desktop on Windows requires authentication when pulling from with docker.io: "docker login" required
with quay.io registry: works fine
This is also the case if I'm using the Docker CLI:
I will open an case at Docker Desktop support and hope they can shine some light into why the Docker Engine API on Docker Desktop for Windows requires authentication to pull public/sponsored OSS image from docker.io. In the meantime I will use the "workaround" and supply @scottfrederick Thanks for sticking with me! Closing the issue as it not related to Spring Boot and the Maven plugin itself. |
Faced with same issue on may mac (but few months ago I haven't seen such issues...)
Only described workaround works when to spring-boot maven plugin we need to pass credentials
|
When running the
build-image
goal of spring-boot-maven-plugin on Windows with Docker Desktop, the build fails when the plugin tries to pull the buildpacks builder image via Docker API.(full maven debug log see attachment)
This seems to be related to an authentication issue, because the
docker.log
(located%LOCALAPPDATA%\Docker\log\vm
) contains this error:To debug this issue further I manually issued the problematic Docker API call with cURL:
As the response body of the problematic call contains
Please run 'docker login'
I also checked that my Dockerconfig.json
contains the relevant data:So somehow this is also related or blocked by #25898
Pulling the image via Docker CLI works without a problem:
My environment:
full_log.txt
The text was updated successfully, but these errors were encountered: