-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Connection fails when DOCKER_HOST set to local socket #21173
Comments
This was in eduk8s BTW, and the workshop died before I had a chance to get more details. It's a restrictive environment but probably not unrealistic in the wild. |
#20538 was fixed in M4 so there must be something we missed. |
That does look like a similar issue. In this case DOCKER_HOST was set to a socket (ie a file) so maybe that’s the corner case we didn’t cover yet? |
We can confirm this is still happening and as @dsyer mentions we think that it's a problem when Docker socket is not treated like a linux socket but rather as an http endpoint. We can see a stacktrace like this:
This trace makes us think that connection to a socket is not being made properly. |
Here's the detail from the stack trace:
I can confirm that the socket works with curl:
|
Currently, when the |
Prior to this commit, if a DOCKER_HOST environment variable was present when attempting to communicate with a Docker daemon, it was assumed that the value of that variable was an address that could be used to create an HTTP connection to a remote daemon. In some cases, the value of the variable is the path to a local socket file, which would cause the HTTP connection to fail. This commit adds additional validation of the value of the DOCKER_HOST environment variable to determine whether it is a remote address or a local socket file and create the appropriate connection type. Fixes spring-projectsgh-21173
Running
mvn spring-boot:build-image
and getting this error:The Docker CLI works fine via a
DOCKER_HOST
env var (probably a plausible analog of a "standard" low-trust enterprise environment). I assume that this is messing with the Maven plugin.The text was updated successfully, but these errors were encountered: