turnbullpress / dockerbook-code

The code and configuration examples from The Docker Book (http://www.dockerbook.com)
927 stars 581 forks source link

I couldn't get the tprov examples to work in boot2docker #19

Closed gswallow closed 8 years ago

gswallow commented 8 years ago

tprov tried to speak HTTPS to the docker daemon in my boot2docker VM but the port mismatched, which I had to figure out how to use by looking at the example code and setting DOCKER_URL. Then I had issues with the boot2docker certs not matching the CA certificate, etc., and Sinatra spilled quite a few drinks. Friggin' drunk.

Finally, I realized, "why not just NOT use SSL and mount /var/run/docker.sock as a volume," like @jpetazzo said in http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/, and I have this pull request. Maybe it's not complete.

When I run the tprov container, the command is:

docker run -d -P -v /var/run/docker.sock:/var/run/docker.sock --privileged --name tprov gswallow/tprov

Finally, it appears that start and create are different in newer versions of the docker API.