Skip to content

Connection fails when DOCKER_HOST set to local socket #21173

Closed
@dsyer

Description

@dsyer

Running mvn spring-boot:build-image and getting this error:

...
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.0.M4:build-image (default-cli) on project 
demo: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.3.0.M4:build-image failed: Docker API c
all to '/var/run/docker/docker.sock/v1.24/images/create?fromImage=docker.io%2Fcloudfoundry%2Fcnb%3Abionic-platform-api-0.2' fai
led with status code 500 "/var/run/docker/docker.sock: Name or service not known" -> [Help 1]                                  
[ERROR]                                                                                                                        
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.                                            
[ERROR] Re-run Maven using the -X switch to enable full debug logging.                                                         
[ERROR]                                                                                                                        
[ERROR] For more information about the errors and possible solutions, please read the following articles:                      
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException                                     

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions