Spring boot with docker unable to find valid certification path to requested target error
<p>I'm using spring boot and am trying to set it up with <strong><em>Docker</em></strong>. I've tried everything I could find on google and nothing seems to get me going. I'm running </p>

<pre><code> mvn clean package docker:build 
</code></pre>

<p>Running this will do the spring-boot tests, run DB migrations, build the JAR, and then when it comes to Building the <strong><em>Docker image</em></strong>, I get the following error:</p>

<pre><code>Failed to execute goal com.spotify:docker-maven-plugin:0.4.9:build (default-cli) 
on project app: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: 
unable to find valid certification path to requested target -&gt; [Help 1]
</code></pre>

<p>Here is the Dockerfile I'm using:</p>

<pre><code>FROM java:8-jdk
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/james/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
EXPOSE 8080
VOLUME /tmp
ADD app-0.0.1-SNAPSHOT.jar app.jar
RUN sh -c 'touch /app.jar'
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
</code></pre>

<p>And here is my docker-maven-plugin configuration:</p>

<pre><code> ... pom stuff
&lt;docker.image.prefix&gt;jamesone1&lt;/docker.image.prefix&gt;
    ... other pom stufff
&lt;plugin&gt;
    &lt;groupId&gt;com.spotify&lt;/groupId&gt;
    &lt;artifactId&gt;docker-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;0.4.9&lt;/version&gt;
    &lt;configuration&gt;
            &lt;dockerHost&gt;https://192.168.99.100:2376&lt;/dockerHost&gt;
            &lt;imageName&gt;${docker.image.prefix}/${project.artifactId}&lt;/imageName&gt;
            &lt;dockerDirectory&gt;src/main/docker&lt;/dockerDirectory&gt;

            &lt;resources&gt;
                &lt;resource&gt;
                    &lt;targetPath&gt;/&lt;/targetPath&gt;
                    &lt;directory&gt;${project.build.directory}&lt;/directory&gt;
                    &lt;include&gt;${project.build.finalName}.jar&lt;/include&gt;
                &lt;/resource&gt;
            &lt;/resources&gt;
    &lt;/configuration&gt;
&lt;/plugin&gt;
</code></pre>

<p>I'm using the dock for mac &amp; am using a <strong><em>docker-machine</em></strong> with the following env: </p>

<pre><code>export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/james/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
</code></pre>

<p>What's going on?! Am I missing something?</p>