Skip to content

[docker-in-docker] v2 and v3 feature fails now for previously perfectly working devcontainer configurations #1662

@thediveo

Description

@thediveo

base system:

  • Ubuntu 26.04 LTS
  • Host Docker Engine Community 29.5.0, API 1.54 (min API 1.40)

devcontainer configuration

{
    "name": "morbyd (docker-in-docker)",
    "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
    "features": {
        "ghcr.io/devcontainers/features/docker-in-docker:3": {
            "version": "latest",
            "moby": false // go for the upstream Docker-CE
        },
        //"ghcr.io/thediveo/devcontainer-features/local-pkgsite:0": {},
        //"ghcr.io/thediveo/devcontainer-features/goreportcard:0": {},
        //"ghcr.io/thediveo/devcontainer-features/go-mod-upgrade:0": {},
        //"ghcr.io/thediveo/devcontainer-features/lazygit:0": {},
        //"ghcr.io/thediveo/devcontainer-features/gocover:0": {
        //    "tags": "matchers",
        //    "uncovered-packages": "github.com/thediveo/morbyd/v2/run/dockercli",
        //    "num-programs": "1",
        //    "race": true,
        //    "verbose": true,
        //    "html": true
        //},
        //"ghcr.io/thediveo/devcontainer-features/pin-github-action:0": {}
    },
    "remoteEnv": {
        "GOPATH": "/home/vscode/go",
        "PATH": "/home/vscode/go/bin:/go/bin:/usr/local/go/bin:${localEnv:PATH}"
    },
    "postCreateCommand": "go install go.uber.org/mock/mockgen@latest",
    "customizations": {
        "vscode": {
            "extensions": [
                "stkb.rewrap",
                "brunnerh.insert-unicode",
                "mhutchie.git-graph",
                "ms-vscode.makefile-tools",
                "redhat.vscode-yaml"
            ]
        }
    }
}

As you can see from the above configuration, still using the 24.04 base image here. Inside the devcontainer, docker ps fails with Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

ps faux shows this interesting part:

root           1  0.0  0.0   1168   780 ?        Ss   16:34   0:00 /sbin/docker-init -- /bin/sh -c echo Container started trap "exit 0" 15 /usr/local/share/docker-init.sh exec "$@" while sleep 1 & wait $!; do :; done -
root           7  0.0  0.0   2808  1908 ?        S    16:34   0:00 /bin/sh -c echo Container started trap "exit 0" 15 /usr/local/share/docker-init.sh exec "$@" while sleep 1 & wait $!; do :; done -
root        8290  0.0  0.0   2704  1616 ?        S    16:39   0:00  \_ sleep 1
root        7216  0.0  0.0 2754320 46048 ?       Sl   16:35   0:00 /usr/bin/containerd --config /etc/containerd/config.toml

So, containerd runs and responds to sudo ctr version, but dockerd is missing.

I've removed all containers, images and volumes, but to no avail. Always same problem.

Disabling all features except for docker-in-docker still shows the failure.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions