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:-


        <!-- push the image on docker hub -->
                <!-- war file locaion wheere war should be present (copied) -->
                <targetPath>/   </targetPath>

Docker machine details

$ env | grep 'DOCKER'
DOCKER_TOOLBOX_INSTALL_PATH=C:\Program Files\Docker Toolbox

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


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.