This Jenkins Docker image provides Docker inside itself, which allows you to run any Docker container in your Jenkins build script. It also optionally allows the ability to push to a self-signed secure private registry.
Run it with mounted directory from host:
docker run --name jenkins-dind --privileged -d -p 8080:8080 -v /path/to/jenkins/workspace:/var/lib/jenkins jenkins-dind
This Docker image is based on jpetazzo/dind instead of the offical Jenkins. Supervisord is used to make sure everything has proper permission and lanuch in the right order. Morever, Docker Compose is available for launching multiple containers inside the CI.