A Docker image which allows for running Docker in Docker (DinD). This image is meant to be used with the Jenkins Docker plugin. It allows for Docker containers used as Jenkins build slaves to create and publish their own Docker images in-turn.
- The container must be run with
--privilegedin order for nested-Docker to work. There is a check box to enable this for the image within the Jenkins UI.
I have a write-up of how to use Docker containers as build slaves within Jenkins at: http://dantehranian.wordpress.com/2014/09/08/docker-jenkins-dynamically-provisioning-sles-11-build-containers/
Once your Jenkins slave is up and running, you can run
docker commands like
docker pull, and
docker push from within the Docker build slave container.
why your new version don't work?!!!!
- /usr/sbin/sshd -D
mount: block device none is write-protected, mounting read-only
mount: cannot mount block device none read-only
Could not mount /sys/kernel/security.
AppArmor detection and --privileged mode might break.
mkdir: cannot create directory '/sys/fs/cgroup/name=systemd': Read-only file system
mount: mount point /sys/fs/cgroup/name=systemd does not exist
ln: failed to create symbolic link '/sys/fs/cgroup/systemd/name=systemd': Read-only file system
INFO API listen on /var/run/docker.sock
ERRO [graphdriver] prior storage driver "aufs" failed: permission denied
FATA Error starting daemon: error initializing graphdriver: permission denied
Another rebuild for docker 1.6 would be nice. Sorry to have to keep bugging you about it. :)
The Jenkins Docker plugin by default starts containers with the command
/usr/sbin/sshd -D. In the "Docker Command" field you'll need to explicitly specify the command
/jenkins-slave-startup.sh for this container to work correctly.
I kept getting thrown off because I couldn't use the
docker command in the container. Hopefully this helps anyone with similar issues.
@nubs - Started the build.
re: repo links - Wouldn't I want to link to "evarga/jenkins-slave" since that's what I'm inheriting from in my "FROM" statement?
Could you trigger a rebuild of this (maybe with a tag) so that Docker 1.5.0 gets used? It may make sense to add a repository link to jpetazzo/dind so this rebuilds whenever dind is rebuilt (kinda hacky, but makes some sense)