2

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.

sakura
  • 2,249
  • 2
  • 26
  • 39
  • Did you try and open that port on the VM itself? (as in http://stackoverflow.com/a/29998490/6309) – VonC Jun 04 '15 at 06:55
  • @VonC Just checked the link but it seems he is already having image which he wants to run and before running he need to open the port. But for me build itself is getting failed. If it will pass, I suppose I will have an image to run. – sakura Jun 04 '15 at 07:09

0 Answers0