Reputation: 53916
Attempting to build maven-docker project using guide at https://github.com/spotify/docker-maven-plugin and Spring boot docker guide : https://spring.io/guides/gs/spring-boot-docker/
When I run $ mvn clean package docker:build
from the
'Docker Quickstart Terminal' I recieve error :
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.3.9:build (default-cli) on project functionrepo: Exception caught: Request error: POST https://192.168.99.100:2376/build?t=functionrepo: 500: HTTP 500 Internal Server Error -> [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
This error is explained within guide:
InternalServerErrorException: HTTP 500 Internal Server Error
Problem: when building the Docker image, Maven outputs an exception with a stacktrace like:
Caused by: com.spotify.docker.client.shaded.javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error docker-maven-plugin communicates with your local Docker daemon using the HTTP Remote API and any unexpected errors that the daemon encounters will be reported as 500 Internal Server Error.
Check the Docker daemon log (typically at /var/log/docker.log or /var/log/upstart/docker.log) for more details.
But I cannot find the docker.log file, it does not seem to be created. I've searched entire Windows system for this file.
Can I use 'Docker Quickstart Terminal' for building or do I need to load my project into the docker VM and build from there ?
How to fix this issue or turn on logging?
Here is my maven config:
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.3.9</version>
<configuration>
<imageName>functionrepo</imageName>
<dockerDirectory>src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
[..]
<properties>
<!-- The main class to start by executing java -jar -->
<start-class>common.WebApplicationDriver</start-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<docker.image.prefix>springio</docker.image.prefix>
</properties>
Update :
$ docker-machine active
default
$ docker-machine env default
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="C:\Users\aR\.docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env default)
Running : $ mvn clean package docker:build
returns same error
Update 2 :
I encountered this bug : https://github.com/docker/docker-py/issues/730 to fix renamed DockerFile to dockerfile
Upvotes: 0
Views: 1442
Reputation: 104185
But I cannot find the docker.log file, it does not seem to be created. I've searched entire Windows system for this file.
There is no point looking for that file on your Windows file system because the Docker daemon does not run on Windows.
As you are using the Docker Toolbox, the Docker engine (or daemon) runs in a virtual machine created with VirtualBox. If you are looking for this file, you would have to search within that virtual machine file system.
Upvotes: 1