The docker:dind image is required because it actually starts up the docker daemon when it is brought up by a runner.
The docker cli can exist on a host/container without having the daemon running and can be pointed to control a daemon running somewhere else.
I believe you could technically use the… Answer from tmos22 on forum.gitlab.com
Docker Hub
hub.docker.com › _ › docker
docker - Official Image | Docker Hub
Starting in 18.09+, the dind variants of this image will automatically generate TLS certificates in the directory specified by the DOCKER_TLS_CERTDIR environment variable.
Docker
hub.docker.com › layers › library › docker › dind › images › sha256-dfe8abb3be77d61d126a4cdc30c4c6099ad715920eec2c4c0203b0e154479d98
Image Layer Details - sha256-dfe8abb3be77d61d126a4cdc30c4c6099ad715920eec2c4c0203b0e154479d98:dind
Docker Suite · Sign inSign up · Multi-platform · Also known as: 20-dind · 20.10-dind · 20.10.18-dind · 20.10.18-dind-alpine3.16 · Developer tools · Index digest · sha256:76cd6bbc3ab600fced21a7e1bea77ac00cb7c545eb95d5767e4ec4ffbcb242dc · OS/ARCH · · · Compressed size · --- Last pushed · 1 day by doijanky · Type · Image ...
Why `services: docker:dind` is needed while already having `image: docker`?
Hello everybody, If I want to use ... But then, why I need to have for that job also the following service config? build_job: image: docker:latest services: - docker:dind I was thinking that since the job will be ran inside th...... More on forum.gitlab.com
How to list Docker images built using DinD (Docker in Docker) - Stack Overflow
I'm using the DinD (Docker in Docker) approach to build some images. My hosting machine has Docker installed: $ apt list --installed docker* Listing... Done docker-ce-cli/focal,now 5:20.10.22~3-0~... More on stackoverflow.com
Pre-pull images in Docker in Docker (dind) - Stack Overflow
I am running a docker-in-docker container that always uses the same few images. I would like to pre-pull those in my dind container so I don't have to pull them at startup. How would I be able to a... More on stackoverflow.com
saving docker images inside dind
anyway to make it possible to save or preload the dind with other docker images and containers? When I attempt to commit a dind container with preloaded docker images and containers, the commit goe... More on github.com
GitLab
forum.gitlab.com › gitlab ci/cd
Why `services: docker:dind` is needed while already having `image: docker`? - GitLab CI/CD - GitLab Forum
October 3, 2020 - Hello everybody, If I want to use the docker commands in a job (for example for building an image or pushing to a registry), I understood that within the image: part of the job I have to have an image in which the docker command is available… So let’s simply have: build_job: image: docker:latest But then, why I need to have for that job also the following service config? build_job: image: docker:latest services: - docker:dind I was thinking that since the job will be ran inside th...
Docker
docker.com › docker-in-docker: containerized ci workflows | docker
Docker-in-Docker: Containerized CI Workflows | Docker
June 5, 2026 - Okay, now Docker-in-Docker, what are the pros and cons? The pros is that it’s easy to use because it relies on a DinD image that it’s already packaged for you, and actually contains both the engine and the CLI. The example before, we split them just to compare with Docker out of Docker, but in reality, within that DinD image, you pretty much have everything that you need.
OneUptime
oneuptime.com › home › blog › how to run docker inside docker (dind) safely
How to Run Docker Inside Docker (DinD) Safely
January 16, 2026 - services: dind: image: docker:dind privileged: true environment: - DOCKER_TLS_CERTDIR=/certs volumes: - docker-certs-ca:/certs/ca - docker-certs-client:/certs/client - dind-storage:/var/lib/docker docker-client: image: docker:latest environment: - DOCKER_HOST=tcp://dind:2376 - DOCKER_TLS_VERIFY=1 - DOCKER_CERT_PATH=/certs/client volumes: - docker-certs-client:/certs/client:ro depends_on: - dind command: docker info volumes: docker-certs-ca: docker-certs-client: dind-storage:
Stack Overflow
stackoverflow.com › questions › 76315340 › how-to-list-docker-images-built-using-dind-docker-in-docker
How to list Docker images built using DinD (Docker in Docker) - Stack Overflow
Also, I just do docker image and filter or grep that. docker images ls gets an empty list for me, docker images | wc -l gives me north of 100 here... ... I'm exploring BinderHub binderhub.readthedocs.io and they use Docker-in-Docker. ... Save this answer. ... Show activity on this post. Just run docker command from inside the container. docker exec the_container_running_dind docker image ls
Docker Hub
hub.docker.com › _ › docker › tags
docker Tags | Docker Hub
Docker Official Image• · 1B+• · 2.8K · Docker in Docker! (commonly known as "dind") Developer tools · OverviewTags · Sort by · Newest · · · · TAG · dind-rootless · Last pushed 6 days by doijanky · docker pull docker:dind-rootlessCopy ·
Top answer 1 of 2
10
Here is some way to achieve this.
The idea is to save images that you want to use, and then to import this images during the container startup process.
For example, you can use a folder images where to store your images.
And you have to use a customized entrypoint script that will import the images.
So the Dockerfile will be :
FROM docker:19.03-dind
RUN apk add --update --no-cache bash tini
COPY ./images /images
COPY ./entrypoint.sh /entrypoint.sh
ENTRYPOINT ["tini", "--", "/entrypoint.sh"]
(tini is necessary to load images in background)
And the entrypoint.sh script :
#!/bin/bash
# Turn on bash's job control
set -m
# Start docker service in background
/usr/local/bin/dockerd-entrypoint.sh &
# Wait that the docker service is up
while ! docker info; do
echo "Waiting docker..."
sleep 3
done
# Import pre-installed images
for file in /images/*.tar; do
docker load <$file
done
# Bring docker service back to foreground
fg %1
FYI, an example on how to save an image :
docker pull instrumentisto/nmap
docker save instrumentisto/nmap >images/nmap.tar
2 of 2
9
You can't do this.
If you look at the docker:dind Dockerfile it contains a declaration
VOLUME /var/lib/docker
That makes it impossible to create a derived image with any different content in that directory tree. (This is the same reason you can't create a mysql or postgresql image with prepopulated data.)
Docker Hub
hub.docker.com › r › jpetazzo › dind
jpetazzo/dind - Docker Image
docker run --privileged -d -p 4444 -e PORT=4444 dind Copy · Note: when started with the PORT environment variable, the image will just the Docker daemon and expose it over said port.
Docker Hub
hub.docker.com › _ › docker › tags
docker Tags - dind-rootless
Docker Official Image• · 1B+• · 2.7K · Docker in Docker! (commonly known as "dind") Developer tools · OverviewTags · Sort by · Newest · · · · TAG · 29.6-dind-rootless · Last pushed 6 days by doijanky · docker pull docker:29.6-dind-rootlessCopy ·
Docker
hub.docker.com › layers › library › docker › 24.0.4-dind › images › sha256-adb52cf47859063409c1826d5c09b633d4d8e4f960f43e928b128caa7223c23e
Image Layer Details - sha256-adb52cf47859063409c1826d5c09b633d4d8e4f960f43e928b128caa7223c23e:24.0.4-dind
Docker Suite · Sign inSign up · Multi-platform · Also known as: 24 · 24-dind · 24.0 · 24.0-dind · 24.0.4 · + 4 more · Developer tools · Index digest · sha256:ec0c2cf754e65f0a97af7e9fa17294eac0240df9082c5a234da81503858427e2 · OS/ARCH · linux/amd64 · · Compressed size · 115.11 MB · Last pushed · about 3 years by doijanky · Type · Image ·