So I ended up with the solution suggested in the article. There is one issue left unresolved though, and that issue is when I use the Docker socket from within the Jenkins container, the container does not have permission to use the socket. I ended up having to modify the permission on the Docker socket on the host machine. I have a working solution now, but it leaves more to desire.
Thanks for the article! On Thursday, September 17, 2015 at 11:59:49 AM UTC+7, Baptiste Mathus wrote: > > Hi, > Paraphrasing if you're using docker in docker, then think twice ;). > > You certainly want to read > https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/ > (blog by the very author of DinD, hence obviously insightful). > > Cheers > Le 17 sept. 2015 5:21 AM, "Kha Nguyen" <nlh...@gmail.com <javascript:>> a > écrit : > >> I have a use case where I run Jenkins inside a container using this Jenkins >> official image <https://hub.docker.com/_/jenkins/>. Then I also need >> Jenkins to build Docker images, and for that I also run another container, >> known as docker-in-docker, with this official image with tag 'dind' >> <https://hub.docker.com/_/docker/>. After I have linked the >> docker-in-docker container with the Jenkins container, I can successfully >> ping the docker-in-docker container using the alias from the Jenkins >> container. However, I am unsure about how I can setup docker build for >> Jenkins. I installed the Docker build step plugin >> <https://wiki.jenkins-ci.org/display/JENKINS/Docker+build+step+plugin>, >> which exposes an option to install Docker, and to connect to a Docker >> server. I config the install Docker option, and yet `docker` command is not >> available. I cannot really connect to the Docker server using the alias and >> port 2375. >> >> Any help is really appreciated. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jenkinsci-use...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/b7b25a7e-acf2-458a-aa1e-6f067cd20e4c%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/b7b25a7e-acf2-458a-aa1e-6f067cd20e4c%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ed908c52-bc36-4930-8a7b-0ff8419a3300%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.