centos - Run docker inside a docker container? -
i using docker container build , deploy software collection of ec2's. in deployment script build software , bundle in docker image. image pushed private registry, pulled production ec2's , run. need run docker within docker container.
the problem can't start docker on container. if try
service docker start
i
bash: service: command not found
and if seek
docker -d
i
2014/10/07 15:54:35 docker daemon: 0.11.1-dev 02d20af/0.11.1; execdriver: native; graphdriver: [e2feb6f9] +job serveapi(unix:///var/run/docker.sock) [e2feb6f9] +job initserver() [e2feb6f9.initserver()] creating server 2014/10/07 15:54:35 listening http on unix (/var/run/docker.sock) [error] attach_loopback.go:42 there no more loopback device available. loopback mounting failed [e2feb6f9] -job initserver() = err (1) 2014/10/07 15:54:35 loopback mounting failed
the service command doesn't exist on docker container can't start docker. i'm not sure should doing start docker i'm bit stuck here, help appreciated.
a bit more information
host machine running fedora 20 (will running amazon linux on ec2)
docker container running centos 7.0
host running docker version 1.2.0, build fa7b24f/1.2.0
container running docker-0.11.1-22.el7.centos.x86_64
how not running 'docker within docker' , run docker on host, within docker container? mount docker.sock , docker binary:
docker run -v /var/run/docker.sock:/run/docker.sock -v $(which docker):/bin/docker [your image]
https://github.com/sameersbn/docker-gitlab uses approach spin docker containers, take @ image.
you can take at: https://registry.hub.docker.com/u/mattgruter/doubledocker/
centos docker fedora
No comments:
Post a Comment