Docker machine connection with https I am new to Docker. I installed Docker tool box on my Windows machine.

Using pom.xml I want to generate docker image .
pom.xml:-


&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.11&lt;/version&gt;
    &lt;configuration&gt;
        &lt;repository&gt;${docker.image.prefix}/${project.artifactId}&lt;/repository&gt;
        &lt;imageName&gt;${docker.image.prefix}/${project.artifactId}&lt;/imageName&gt;
        &lt;dockerDirectory&gt;${project.basedir}/src/docker&lt;/dockerDirectory&gt;
        &lt;dockerHost&gt;https://192.168.99.102:2376&lt;/dockerHost&gt;
        &lt;dockerCertPath&gt;C:/Users/shridhar/.docker/machine/machines/default&lt;/dockerCertPath&gt;
        &lt;forceTags&gt;true&lt;/forceTags&gt;
        &lt;imageTags&gt;
            &lt;imageTag&gt;${projectVersion}&lt;/imageTag&gt;
            &lt;imageTag&gt;latest&lt;/imageTag&gt;
        &lt;/imageTags&gt;

        &lt;!-- push the image on docker hub --&gt;
        &lt;serverId&gt;docker-hub&lt;/serverId&gt;
        &lt;registryUrl&gt;https://hub.docker.com&lt;/registryUrl&gt;
        &lt;resources&gt;
            &lt;resource&gt;
                &lt;!-- war file locaion wheere war should be present (copied) --&gt;
                &lt;targetPath&gt;/   &lt;/targetPath&gt;
                &lt;directory&gt;${project.build.directory}&lt;/directory&gt;
                &lt;include&gt;${project.build.finalName}.war&lt;/include&gt;
            &lt;/resource&gt;
        &lt;/resources&gt;
    &lt;/configuration&gt;
&lt;/plugin&gt;


Docker machine details

$ env | grep 'DOCKER'


DOCKER_HOST=tcp://192.168.99.102:2376
DOCKER_MACHINE_NAME=default
DOCKER_TLS_VERIFY=1
DOCKER_TOOLBOX_INSTALL_PATH=C:\Program Files\Docker Toolbox
DOCKER_CERT_PATH=C:\Users\shridhar\.docker\machine\machines\default


I get the below exception:

Caused by: com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.client.ClientProtocolException


If I make tcp connection

&lt;dockerHost&gt;tcp://192.168.99.102:2376&lt;/dockerHost&gt;


then I get below exception:

Caused by: java.lang.IllegalArgumentException: An HTTPS URI for DOCKER_HOST must be provided to use Docker client certificates


What changes do I have to make to build image sucessfully?
Considering you say you want to build an image (and not push it to Docker hub or wherever):

docker-maven-plugin project recommends using dockerfile-maven for new projects, as the former


  [...] ultimately led to a lot of unnecessary confusion with our users that stemmed from introducing extra abstractions and a need for configuration on top of what Docker is providing.


The dockerfile-maven README should get you started, with both a sample Dockerfile and  the relevant plugin section for your pom.xml