spotify / docker-maven-plugin

INACTIVE: A maven plugin for Docker
Apache License 2.0
2.67k stars 575 forks source link

Failed to build the Docker image #267

Closed Sriharsha1693 closed 8 years ago

Sriharsha1693 commented 8 years ago

Description

I have initially executed the command mvn clean install package on the Root Hygieia, api.jar has been successfully created in the target folder.

Then, Installed mongo db able to connect the api collector with the dashboard db

Then, when I tried to execute the below command for Docker image,

mvn clean package -pl api docker:build

facing the Build failure issue

How to reproduce

[Add steps on how to reproduce this issue]

What do you expect

[Describe what do you expect to happen]

What happened instead

[Describe the actual results]

Software:

Results :

Tests run: 114, Failures: 0, Errors: 0, Skipped: 3

[INFO]
[INFO] --- maven-jar-plugin:2.5:jar (default-jar) @ api ---
[INFO] Building jar: D:\Hygieia-master\api\target\api.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:1.2.5.RELEASE:repackage (default) @ api ---
[INFO]
[INFO] --- docker-maven-plugin:0.4.10:build (default-cli) @ api ---
[INFO] Copying D:\Hygieia-master\api\target\api.jar -> D:\Hygieia-master\api\target\docker\hygieia\api.jar
[INFO] Copying D:\Hygieia-master\api\docker\Dockerfile -> D:\Hygieia-master\api\target\docker\Dockerfile
[INFO] Copying D:\Hygieia-master\api\docker\properties-builder.sh -> D:\Hygieia-master\api\target\docker\properties-builder.sh
[INFO] Copying D:\Hygieia-master\api\docker\README.md -> D:\Hygieia-master\api\target\docker\README.md
[INFO] Building image hygieia-api
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.255 s
[INFO] Finished at: 2016-08-17T17:10:51+05:30
[INFO] Final Memory: 53M/247M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.10:build (default-cli) on project api: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect -> [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
mattnworb commented 8 years ago

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.10:build (default-cli) on project api: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect -> [Help 1]

This likely either means that you do not have the docker daemon running at this address, or you need to set the DOCKER_HOST environment variable (as mentioned in the README) to the correct address for your docker installation.

Farhood0011 commented 7 years ago

I am having this error while building the docker image

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.14:build (default) on project mavenSensor: Unable to parse configuration of mojo com.spotify:docker-maven-plugin:0.4.14:build for parameter targetpath: Cannot find 'targetpath' in class org.apache.maven.model.Resource -> [Help 1]

Can anyone help me ?

thanks

stuartg23 commented 6 years ago

Farhood0011. Did you ever get an answer?

Ademord commented 6 years ago

I am also looking for an answer to @Farhood0011 's point..

Biswa5945 commented 5 years ago

@Farhood0011 , @stuartg23 and @Ademord , you may try using Camel Case for the tag names like 'targetPath' instead of 'targetpath'. That should resolve the issues.

rameshdhanapal commented 4 years ago

set DOCKER_HOME in environment property example variable DOCKER_HOME VALUE : tcp://localhost:2375

stuartg23 commented 4 years ago

Thank you, I will try that.

On Wed, 15 Jan 2020, 3:06 AM rameshdhanapal, notifications@github.com wrote:

set DOCKER_HOME in environment property example variable DOCKER_HOME VALUE : tcp://localhost:2375

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spotify/docker-maven-plugin/issues/267?email_source=notifications&email_token=AA4FBJ5UPW4FQQKFGHPG2WDQ5XWI7A5CNFSM4CMZRJE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI5MEGA#issuecomment-574276120, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4FBJ53I7OO2U5MWJ5QYKLQ5XWI7ANCNFSM4CMZRJEQ .