dind-jenkins-slave icon indicating copy to clipboard operation
dind-jenkins-slave copied to clipboard

Unable to run docker server within docker container

Open joshku opened this issue 9 years ago • 4 comments

Hi, I downloaded your image onto my VM and created a docker image using the --privileged flag but I was unable to create another docker image as the docker server was not running. The following are the steps that I took.

docker run -Pd --privileged tehranian/dind-jenkins-slave
#I then did a ssh into the container and ran docker version
jenkins@b327872b1a5d:~$ docker version
Client:
 Version:      1.8.1
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   d12ea79
 Built:        Thu Aug 13 02:35:49 UTC 2015
 OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

I am unsure what is going on here but I know sometimes when I create a container it would work and the server would be there and I can run another container within a container but most of the time this would be the output.

joshku avatar Sep 11 '15 21:09 joshku

Same issue here.. !!

dileep-p avatar Jan 05 '16 20:01 dileep-p

Same here. Guys do you have any progress on this? Is anyone looking into this?

I found out that if i want to try it locally this problem occurs when i directly runs command when starting this image. But when i start it in detached mode and then exec something it works, but dont know how to do it with docker plugin.

kukjevov avatar May 08 '17 19:05 kukjevov

I got it working.

In your Cloud in Docker Template set Docker Command to /jenkins-slave-startup.sh and it will work then.

kukjevov avatar May 08 '17 19:05 kukjevov

Nice. That worked for me too.

I was with this same problem some time.

viniciuseduardo avatar May 24 '17 07:05 viniciuseduardo