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:-
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.11</version>
<configuration>
<repository>${docker.image.prefix}/${project.artifactId}</repository>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<dockerDirectory>${project.basedir}/src/docker</dockerDirectory>
<dockerHost>https://192.168.99.102:2376</dockerHost>
<dockerCertPath>C:/Users/shridhar/.docker/machine/machines/default</dockerCertPath>
<forceTags>true</forceTags>
<imageTags>
<imageTag>${projectVersion}</imageTag>
<imageTag>latest</imageTag>
</imageTags>
<!-- push the image on docker hub -->
<serverId>docker-hub</serverId>
<registryUrl>https://hub.docker.com</registryUrl>
<resources>
<resource>
<!-- war file locaion wheere war should be present (copied) -->
<targetPath>/ </targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.war</include>
</resource>
</resources>
</configuration>
</plugin>
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
<dockerHost>tcp://192.168.99.102:2376</dockerHost>
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?