Docker-in-Docker is a docker solution mostly used on CI/CD pipelines. This dind image is based on Ubuntu and features the s6-overlay for running the dockerd service. s6-overlay can come in handy when creating multi service agents for CI/CD pipelines. For example, Azure Devops Pipelines agent.
22.04
,latest
20.04
18.04
You can and should use it as a base image. It is as simple as adding your own CMD
. However, you may want to checkout the conventions and limits of s6-overlay. Note that, s6-overlay uses ENTRYPOINT
, so consider your use cases before using this image.
docker run -it --privileged dcagatay/ubuntu-dind:20.04 /bin/bash
You probably won't but you can run the image with the above command.
DOCKER_EXTRA_OPTS
: Used to give arguments todockerd
command. Details can be found on its reference. Default:--log-level=error --experimental
You can build your own images specifying following build arguments.
DOCKER_VERSION
: Docker version to be installed.DOCKER_CHANNEL
: Docker release channel. Can be one of stable, test, nightly. Default:stable
DOCKER_COMPOSE_VERSION
: Version of the docker-compose.
I was inspired by cruizba/ubuntu-dind. It uses a supervisord to run the dockerd as a service whereas this image uses the s6-overlay.
The --privileged
argument has security implications.