Sign in

Universal mod

Docker-in-docker (dind)

This mod adds docker-in-docker (dind) to Ubuntu and Alpine based images, to be installed/updated during container start. Main advantage is that all docker images, containers, volumes, etc. will reside inside the container and will be sandboxed from the host's docker environment.

arch
amd64, arm64
version
29.10.1-5.8.1
built

Use it#

Set DOCKER_MODS on any LinuxServer.io container and recreate it. The mod is pulled on every start; several mods are separated with |.

DOCKER_MODS=ghcr.io/linuxserver-playground/mods:universal-docker-in-docker

:universal-docker-in-docker always gets the newest build. To stay on this one, version 29.10.1-5.8.1, pin its tag:

DOCKER_MODS=ghcr.io/linuxserver-playground/mods:universal-docker-in-docker-29.10.1-5.8.1

The control plane checks the upstream version every hour and builds the mod when a new one is out; the scheduler shows the latest check.

services:
  code-server:
    image: ghcr.io/linuxserver-playground/code-server:latest
    environment:
      - DOCKER_MODS=ghcr.io/linuxserver-playground/mods:universal-docker-in-docker

Also for openvscode-server.

Details#

How to enable:

In the container’s docker arguments,

  • Set an environment variable DOCKER_MODS=ghcr.io/linuxserver-playground/mods:universal-docker-in-docker
  • Set the privileged option for the container

Docker data root will reside under /config/var/lib/docker by default, this is configurable by setting MODS_DIND_PERSISTENCE to the wanted path. On amd64, QEMU will be enabled on container start.

Community project

Improve this mod, or make your own

Mods are how LinuxServer images grow without getting heavier: a Dockerfile, a few scripts and a mod.yml. If this one is missing something, or you need one like it for another image, an AI agent in our harness can build and test it with you.

Ask your agent

  • The universal-docker-in-docker mod <what is wrong>. Fix it, test it and draft the PR.
  • Make a mod like universal-docker-in-docker for <another image>, and test it.

Making a mod Every way to help Get the harness (opens in a new tab)

Source: universal-docker-in-docker branch (opens in a new tab). Every mod