I am exploring docker to deploy my dockerized java sample project on windows7 using boot2Docker. When I am building the dockerized java app using command ./gradlew build buildDocker
. I am getting an issue as follows:
Execution failed for task ':buildDocker'.
> javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
My build.gradle
file had docker settings as follows:
docker {
useApi true
hostUrl 'https://192.168.59.103:2376'
}
I searched for some probable solution for the same and got this link. I tried both the workarounds but none working for me. For the first approach i.e. changing profile and tried building again the project also failed with above error.
In the second workaround, I tried to install and run
$(docker run sequenceiq/socat)
the command downloaded the package and runned as well. But when I tried to check the running images using command docker ps
, Nothing came in result set.
After that I tried pinging using curl http://192.168.59.103:2375/_ping
returned error as curl: (7) Failed to connect to 192.168.59.103 port 2375: Connection refused
Anyway I changed my docker configuration in build.gradle
file as follows:
docker {
useApi true
hostUrl 'http://192.168.59.103:2375'
}
And run the build command i.e. ./gradlew build buildDocker
again to get below error:
Execution failed for task ':buildDocker'.
> org.apache.http.conn.HttpHostConnectException: Connection to http://192.168.59
.103:2375 refused.
So it seems both the workaround is not working for me. Any one faced the same and have any clue about what I am missing here.