Skip to content

Improve error message when creating an image with no Docker Daemon available #20151

@snicoll

Description

@snicoll

If the docker daemon isn't running locally, we get the following exception at the moment:

[INFO] --- spring-boot-maven-plugin:2.3.0.BUILD-SNAPSHOT:build-image (build-image) @ demo-image ---
[INFO] Building image 'docker.io/snicoll78/demo-image:latest'
[INFO] 
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->docker://localhost:2376: com.sun.jna.LastErrorException: [61] Connection refused
[INFO] Retrying request to {}->docker://localhost:2376
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->docker://localhost:2376: com.sun.jna.LastErrorException: [61] Connection refused
[INFO] Retrying request to {}->docker://localhost:2376
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->docker://localhost:2376: com.sun.jna.LastErrorException: [61] Connection refused
[INFO] Retrying request to {}->docker://localhost:2376
[INFO]  > Pulling builder image 'docker.io/cloudfoundry/cnb:0.0.53-bionic' 100%
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.379 s
[INFO] Finished at: 2020-02-13T08:41:28+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.0.BUILD-SNAPSHOT:build-image (build-image) on project demo-image: com.sun.jna.LastErrorException: [61] Connection refused -> [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/MojoExecutionException

We should consider improve that with a more dedicated error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions