Skip to content

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

Closed

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.

Activity

  1. v-Kaniska244 commented on May 25, 2026

    @v-Kaniska244
    Contributor

    Hi TheDiveO (@thediveo)

    Thank you for reporting this issue. I have tried with the exact same setup as reported but it doesn't seem to be reproducing for the moment with either docker-in-docker v2 or v3 features.
    Would you be able to help with the following information which could help us to investigate this further:

    • Is this dev container build running on a CI pipeline? Is it using x86_64 or arm64 CPU architecture?
    • Would it be possible for you to share the devcontainer build/ run log for this?
    • Also the last 30-40 lines from the containerd.log and dockerd.log(if available) could be great if avilable.
  2. max06 commented on May 25, 2026

    @max06
    Contributor

    I can provide details from my failing system:

    • Locally, x86_64
    • Build succeeds, docker fails to start due to issues with nftables/iptables.
    • Option moby: false is set due to debian trixie image used for the devcontainer.

    I'm running nixos unstable with nftables on my host system.

    Log-file:

    time="2026-05-24T17:59:16.837581809Z" level=info msg="Starting up"
    time="2026-05-24T17:59:16.838352257Z" level=info msg="OTEL tracing is not configured, using no-op tracer provider"
    time="2026-05-24T17:59:16.838424342Z" level=info msg="CDI directory does not exist, skipping" dir=/etc/cdi
    time="2026-05-24T17:59:16.838431626Z" level=info msg="CDI directory does not exist, skipping" dir=/var/run/cdi
    time="2026-05-24T17:59:16.848953905Z" level=info msg="Creating a containerd client" address=/run/containerd/containerd.sock timeout=1m0s
    time="2026-05-24T17:59:16.858172945Z" level=info msg="Loading containers: start."
    time="2026-05-24T17:59:16.858217379Z" level=info msg="NRI is disabled"
    time="2026-05-24T17:59:16.858223500Z" level=info msg="Starting daemon with containerd snapshotter integration enabled"
    time="2026-05-24T17:59:16.875562847Z" level=info msg="Restoring containers: start."
    time="2026-05-24T17:59:16.895618747Z" level=info msg="Deleting nftables IPv4 rules" error="exit status 1" output="Error: Could not process rule: No such file or directory\ndelete table ip docker-bridges"
    time="2026-05-24T17:59:16.916981002Z" level=info msg="Deleting nftables IPv6 rules" error="exit status 1" output="Error: Could not process rule: No such file or directory\ndelete table ip6 docker-bridges"
    time="2026-05-24T17:59:16.944466771Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby
    time="2026-05-24T17:59:16.944806559Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
    time="2026-05-24T17:59:16.944860581Z" level=info msg="Daemon shutdown complete" error="failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to register \"bridge\" driver: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.11 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)\nPerhaps iptables or your kernel needs to be upgraded.\n (exit status 3)"
    failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to register "bridge" driver: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.11 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.
     (exit status 3)
    

    Running Linux d9839fdacdec 7.0.8 #1-NixOS SMP PREEMPT_DYNAMIC Fri May 15 12:53:54 UTC 2026 x86_64 GNU/Linux.

    Happy to run any tests if needed.

  3. thediveo commented on May 25, 2026

    @thediveo
    Author
    * Is this dev container build running on a CI pipeline? Is it using `x86_64` or `arm64` CPU architecture?
    

    Not in a CI pipeline. This is when using VSCode 1.121.0 on Ubuntu Linux 26.04 with amd64 architecture with upstream Docker CE installed in the host, then using Shift+Ctrl P, Devcontainer: Open Workspace in Container.

    The dev container builds correctly and starts.

    * Also the last 30-40 lines from the containerd.log and dockerd.log(if available) could be great if avilable.
    

    Sure, with pleasure. Following are the complete docker.log contents.

    cat /tmp/dockerd.log 
    time="2026-05-25T19:58:16.657915271Z" level=info msg="Starting up"
    time="2026-05-25T19:58:16.658340095Z" level=info msg="OTEL tracing is not configured, using no-op tracer provider"
    time="2026-05-25T19:58:16.658383935Z" level=info msg="CDI directory does not exist, skipping" dir=/var/run/cdi
    time="2026-05-25T19:58:16.658387945Z" level=info msg="CDI directory does not exist, skipping" dir=/etc/cdi
    time="2026-05-25T19:58:16.664132697Z" level=info msg="Creating a containerd client" address=/run/containerd/containerd.sock timeout=1m0s
    time="2026-05-25T19:58:16.671712605Z" level=info msg="Loading containers: start."
    time="2026-05-25T19:58:16.671739745Z" level=info msg="NRI is disabled"
    time="2026-05-25T19:58:16.671744675Z" level=info msg="Starting daemon with containerd snapshotter integration enabled"
    time="2026-05-25T19:58:16.675004165Z" level=info msg="Restoring containers: start."
    time="2026-05-25T19:58:16.693081807Z" level=info msg="Deleting nftables IPv4 rules" error="exit status 1" output="Error: Could not process rule: No such file or directory\ndelete table ip docker-bridges"
    time="2026-05-25T19:58:16.705168946Z" level=info msg="Deleting nftables IPv6 rules" error="exit status 1" output="Error: Could not process rule: No such file or directory\ndelete table ip6 docker-bridges"
    time="2026-05-25T19:58:16.723096007Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby
    time="2026-05-25T19:58:16.723221438Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
    time="2026-05-25T19:58:16.723227448Z" level=info msg="Daemon shutdown complete" error="failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to register \"bridge\" driver: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.10 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)\nPerhaps iptables or your kernel needs to be upgraded.\n (exit status 3)"
    failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to register "bridge" driver: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.10 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.
     (exit status 3)
    

    Containerd loads successfully:

    cat /tmp/containerd.log 
    time="2026-05-25T19:58:16.547161955Z" level=info msg="starting containerd" revision=193637f7ee8ae5f5aa5248f49e7baa3e6164966e version=v2.2.4
    time="2026-05-25T19:58:16.551770946Z" level=info msg="loading plugin" id=io.containerd.content.v1.content type=io.containerd.content.v1
    time="2026-05-25T19:58:16.551899387Z" level=info msg="loading plugin" id=io.containerd.image-verifier.v1.bindir type=io.containerd.image-verifier.v1
    time="2026-05-25T19:58:16.551907838Z" level=info msg="loading plugin" id=io.containerd.internal.v1.opt type=io.containerd.internal.v1
    time="2026-05-25T19:58:16.551922288Z" level=info msg="loading plugin" id=io.containerd.warning.v1.deprecations type=io.containerd.warning.v1
    time="2026-05-25T19:58:16.551927808Z" level=info msg="loading plugin" id=io.containerd.mount-handler.v1.erofs type=io.containerd.mount-handler.v1
    time="2026-05-25T19:58:16.551934448Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1
    time="2026-05-25T19:58:16.551944648Z" level=info msg="skip loading plugin" error="no scratch file generator: skip plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1
    time="2026-05-25T19:58:16.551948888Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.btrfs type=io.containerd.snapshotter.v1
    time="2026-05-25T19:58:16.552025989Z" level=info msg="skip loading plugin" error="path /var/lib/containerd/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" id=io.containerd.snapshotter.v1.btrfs type=io.containerd.snapshotter.v1
    time="2026-05-25T19:58:16.552031389Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.devmapper type=io.containerd.snapshotter.v1
    time="2026-05-25T19:58:16.552035819Z" level=info msg="skip loading plugin" error="devmapper not configured: skip plugin" id=io.containerd.snapshotter.v1.devmapper type=io.containerd.snapshotter.v1
    time="2026-05-25T19:58:16.552039879Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.native type=io.containerd.snapshotter.v1
    time="2026-05-25T19:58:16.552052609Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.overlayfs type=io.containerd.snapshotter.v1
    time="2026-05-25T19:58:16.552110319Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.zfs type=io.containerd.snapshotter.v1
    time="2026-05-25T19:58:16.552122119Z" level=info msg="skip loading plugin" error="lstat /var/lib/containerd/io.containerd.snapshotter.v1.zfs: no such file or directory: skip plugin" id=io.containerd.snapshotter.v1.zfs type=io.containerd.snapshotter.v1
    time="2026-05-25T19:58:16.552126290Z" level=info msg="loading plugin" id=io.containerd.event.v1.exchange type=io.containerd.event.v1
    time="2026-05-25T19:58:16.552139090Z" level=info msg="loading plugin" id=io.containerd.monitor.task.v1.cgroups type=io.containerd.monitor.task.v1
    time="2026-05-25T19:58:16.552601244Z" level=info msg="loading plugin" id=io.containerd.metadata.v1.bolt type=io.containerd.metadata.v1
    time="2026-05-25T19:58:16.552625034Z" level=info msg="metadata content store policy set" policy=shared
    time="2026-05-25T19:58:16.552868886Z" level=info msg="loading plugin" id=io.containerd.gc.v1.scheduler type=io.containerd.gc.v1
    time="2026-05-25T19:58:16.552892996Z" level=info msg="loading plugin" id=io.containerd.nri.v1.nri type=io.containerd.nri.v1
    time="2026-05-25T19:58:16.552906527Z" level=info msg="built-in NRI default validator is disabled"
    time="2026-05-25T19:58:16.552909907Z" level=info msg="runtime interface created"
    time="2026-05-25T19:58:16.552912257Z" level=info msg="created NRI interface"
    time="2026-05-25T19:58:16.552915797Z" level=info msg="loading plugin" id=io.containerd.differ.v1.erofs type=io.containerd.differ.v1
    time="2026-05-25T19:58:16.554040247Z" level=info msg="loading plugin" id=io.containerd.mount-manager.v1.bolt type=io.containerd.mount-manager.v1
    time="2026-05-25T19:58:16.554091577Z" level=info msg="loading plugin" id=io.containerd.differ.v1.walking type=io.containerd.differ.v1
    time="2026-05-25T19:58:16.554099107Z" level=info msg="loading plugin" id=io.containerd.lease.v1.manager type=io.containerd.lease.v1
    time="2026-05-25T19:58:16.554107247Z" level=info msg="loading plugin" id=io.containerd.service.v1.containers-service type=io.containerd.service.v1
    time="2026-05-25T19:58:16.554113598Z" level=info msg="loading plugin" id=io.containerd.service.v1.content-service type=io.containerd.service.v1
    time="2026-05-25T19:58:16.554118478Z" level=info msg="loading plugin" id=io.containerd.service.v1.diff-service type=io.containerd.service.v1
    time="2026-05-25T19:58:16.554123438Z" level=info msg="loading plugin" id=io.containerd.service.v1.images-service type=io.containerd.service.v1
    time="2026-05-25T19:58:16.554129628Z" level=info msg="loading plugin" id=io.containerd.service.v1.introspection-service type=io.containerd.service.v1
    time="2026-05-25T19:58:16.554133958Z" level=info msg="loading plugin" id=io.containerd.service.v1.namespaces-service type=io.containerd.service.v1
    time="2026-05-25T19:58:16.554139418Z" level=info msg="loading plugin" id=io.containerd.service.v1.snapshots-service type=io.containerd.service.v1
    time="2026-05-25T19:58:16.554144958Z" level=info msg="loading plugin" id=io.containerd.shim.v1.manager type=io.containerd.shim.v1
    time="2026-05-25T19:58:16.554151418Z" level=info msg="loading plugin" id=io.containerd.runtime.v2.task type=io.containerd.runtime.v2
    time="2026-05-25T19:58:16.554175398Z" level=info msg="loading plugin" id=io.containerd.service.v1.tasks-service type=io.containerd.service.v1
    time="2026-05-25T19:58:16.554187408Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.containers type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554208408Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.content type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554218958Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.diff type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554224079Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.events type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554228569Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.images type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554233269Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.introspection type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554237639Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.leases type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554242339Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.mounts type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554246599Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.namespaces type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554251519Z" level=info msg="loading plugin" id=io.containerd.sandbox.store.v1.local type=io.containerd.sandbox.store.v1
    time="2026-05-25T19:58:16.554261499Z" level=info msg="loading plugin" id=io.containerd.transfer.v1.local type=io.containerd.transfer.v1
    time="2026-05-25T19:58:16.554271889Z" level=info msg="loading plugin" id=io.containerd.cri.v1.images type=io.containerd.cri.v1
    time="2026-05-25T19:58:16.554289239Z" level=info msg="Get image filesystem path \"/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs\" for snapshotter \"overlayfs\""
    time="2026-05-25T19:58:16.554294639Z" level=info msg="Start snapshots syncer"
    time="2026-05-25T19:58:16.554304629Z" level=info msg="loading plugin" id=io.containerd.cri.v1.runtime type=io.containerd.cri.v1
    time="2026-05-25T19:58:16.554425390Z" level=info msg="starting cri plugin" config="{\"containerd\":{\"defaultRuntimeName\":\"runc\",\"runtimes\":{\"runc\":{\"runtimeType\":\"io.containerd.runc.v2\",\"runtimePath\":\"\",\"PodAnnotations\":null,\"ContainerAnnotations\":null,\"options\":{\"BinaryName\":\"\",\"CriuImagePath\":\"\",\"CriuWorkPath\":\"\",\"IoGid\":0,\"IoUid\":0,\"NoNewKeyring\":false,\"Root\":\"\",\"ShimCgroup\":\"\",\"SystemdCgroup\":false},\"privileged_without_host_devices\":false,\"privileged_without_host_devices_all_devices_allowed\":false,\"cgroupWritable\":false,\"baseRuntimeSpec\":\"\",\"cniConfDir\":\"\",\"cniMaxConfNum\":0,\"snapshotter\":\"\",\"sandboxer\":\"podsandbox\",\"io_type\":\"\"}},\"ignoreBlockIONotEnabledErrors\":false,\"ignoreRdtNotEnabledErrors\":false},\"cni\":{\"binDir\":\"\",\"binDirs\":[\"/opt/cni/bin\"],\"confDir\":\"/etc/cni/net.d\",\"maxConfNum\":1,\"setupSerially\":false,\"confTemplate\":\"\",\"ipPref\":\"\",\"useInternalLoopback\":false},\"enableSelinux\":false,\"selinuxCategoryRange\":1024,\"maxContainerLogLineSize\":16384,\"disableApparmor\":false,\"restrictOOMScoreAdj\":false,\"disableProcMount\":false,\"unsetSeccompProfile\":\"\",\"tolerateMissingHugetlbController\":true,\"disableHugetlbController\":true,\"device_ownership_from_security_context\":false,\"ignoreImageDefinedVolumes\":false,\"netnsMountsUnderStateDir\":false,\"enableUnprivilegedPorts\":true,\"enableUnprivilegedICMP\":true,\"enableCDI\":true,\"cdiSpecDirs\":[\"/etc/cdi\",\"/var/run/cdi\"],\"drainExecSyncIOTimeout\":\"0s\",\"ignoreDeprecationWarnings\":null,\"containerdRootDir\":\"/var/lib/containerd\",\"containerdEndpoint\":\"/run/containerd/containerd.sock\",\"rootDir\":\"/var/lib/containerd/io.containerd.grpc.v1.cri\",\"stateDir\":\"/run/containerd/io.containerd.grpc.v1.cri\"}"
    time="2026-05-25T19:58:16.554445751Z" level=info msg="loading plugin" id=io.containerd.podsandbox.controller.v1.podsandbox type=io.containerd.podsandbox.controller.v1
    time="2026-05-25T19:58:16.554468881Z" level=info msg="loading plugin" id=io.containerd.sandbox.controller.v1.shim type=io.containerd.sandbox.controller.v1
    time="2026-05-25T19:58:16.554496101Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.sandbox-controllers type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554506131Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.sandboxes type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554510841Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.snapshots type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554515261Z" level=info msg="loading plugin" id=io.containerd.streaming.v1.manager type=io.containerd.streaming.v1
    time="2026-05-25T19:58:16.554519921Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.streaming type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554524301Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.tasks type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554528851Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.transfer type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554542881Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.version type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554547021Z" level=info msg="loading plugin" id=io.containerd.monitor.container.v1.restart type=io.containerd.monitor.container.v1
    time="2026-05-25T19:58:16.554568312Z" level=info msg="loading plugin" id=io.containerd.tracing.processor.v1.otlp type=io.containerd.tracing.processor.v1
    time="2026-05-25T19:58:16.554574292Z" level=info msg="skip loading plugin" error="skip plugin: tracing endpoint not configured" id=io.containerd.tracing.processor.v1.otlp type=io.containerd.tracing.processor.v1
    time="2026-05-25T19:58:16.554577962Z" level=info msg="loading plugin" id=io.containerd.internal.v1.tracing type=io.containerd.internal.v1
    time="2026-05-25T19:58:16.554582212Z" level=info msg="skip loading plugin" error="skip plugin: tracing endpoint not configured" id=io.containerd.internal.v1.tracing type=io.containerd.internal.v1
    time="2026-05-25T19:58:16.554585592Z" level=info msg="loading plugin" id=io.containerd.ttrpc.v1.otelttrpc type=io.containerd.ttrpc.v1
    time="2026-05-25T19:58:16.554595722Z" level=info msg="loading plugin" id=io.containerd.grpc.v1.healthcheck type=io.containerd.grpc.v1
    time="2026-05-25T19:58:16.554746743Z" level=info msg=serving... address=/run/containerd/containerd.sock.ttrpc
    time="2026-05-25T19:58:16.554784934Z" level=info msg=serving... address=/run/containerd/containerd.sock
    time="2026-05-25T19:58:16.554794834Z" level=info msg="containerd successfully booted in 0.007940s"
    
  4. thediveo commented on May 25, 2026

    @thediveo
    Author

    I've noticed that contrary to the image documentation on https://hub.docker.com/r/microsoft/devcontainers-base there is no ubuntu-26.04 tag:

    Error response from daemon: manifest for mcr.microsoft.com/devcontainers/base:ubuntu-26.04 not found: manifest unknown: manifest tagged by "ubuntu-26.04" is not found
    

    However, mcr.microsoft.com/devcontainers/base:ubuntu now refers to an image with lsb_release -a identifying it as Ubuntu 26.04.

    The v3 d-in-d feature correctly starts dockerd in this configuration.

  5. v-Kaniska244 commented on May 26, 2026

    @v-Kaniska244
    Contributor

    Hi TheDiveO (@thediveo) , Hi Flo (@max06)

    Thank you for all the details. From the error it looks like we need revisit the iptables switching logic fix as Docker-in-Docker uses the host kernel's netfilter modules (containers don't have their own kernel). Ubuntu 26.04's kernel has dropped the iptable_nat / legacy ip_tables modules in favor of nf_tables. So iptables-legacy inside the container can't initialize the nat table no matter what as the kernel module doesn't exist on the host. Would you kindly see if changing the container base image to resolute helps in this case or not.

  6. max06 commented on May 26, 2026

    @max06
    Contributor

    Good morning @Kaniska244,

    I think the logic is flawed.

    It looks like you're trying to figure out if you have to use nf instead of iptables based on the container-os, while it actually depends on the host-os kernel. I'm running debian:trixie in my container, the install script sets use_nft only for resolute. But my kernel (nixos) requires nf, so the startup fails.

    From inside the devcontainer, I can use two options to test for netfilter and/or iptables:

    # If nothing shows up, check if it's compiled into the kernel
    $ grep -E 'nf_tables|ip_tables|iptable_' /proc/modules
    
    # Fallback: just check what the kernel supports via sysfs
    ls /proc/sys/net/netfilter/ 2>/dev/null && echo "netfilter subsystem present"
    ls /proc/sys/net/bridge/ 2>/dev/null && echo "bridge netfilter present"
    

    Both tests confirm netfilter on my system.

    I'd recommend changing the start-script.

    Edit:

    Sorry, I need to reword my answer. I just repeated what you wrote and assumed your intention considering the suggested test as a solution candidate. Your suggestion works. Your combination of showing the correct root cause and testing a fix based on an unrelated input threw me off. I jumped to wrong conclusions.

    However: I'd like to suggest creating a proper fix that tests the actual host system instead of using if-conditions and code-names, but you probably already had that in mind.

    I swear, I'm not an LLM. Just a human with some communication problems. And not enough coffee.

  7. thediveo commented on May 26, 2026

    @thediveo
    Author

    It looks like you're trying to figure out if you have to use nf instead of iptables based on the container-os, while it actually depends on the host-os kernel. I'm running debian:trixie in my container, the install script sets use_nft only for resolute. But my kernel (nixos) requires nf, so the startup fails.

    ...and in my original configuration the host had been upgraded to Ubuntu resolute, but the devcontainer image was still 24.04 noble, thus again the wrong decision regarding which way to address nftables.

  8. thediveo commented on Jun 3, 2026

    @thediveo
    Author

    @Kaniska244 I've noticed that the draft bumps up to semver major 4 ... is this just for the draft or do we need to bump up later too? I have quite some devcontainer projects relying on the docker-in-docker feature, so upgrading the major all over again will be ... painful.

  9. v-Kaniska244 commented on Jun 8, 2026

    @v-Kaniska244
    Contributor

    Hi TheDiveO (@thediveo) , Hi Flo (@max06)

    Would you kindly review this PR and let me know your opinion on the same. It would be very helpful to ensure the correctness of the solution and the respective test coverages.

    TheDiveO (@thediveo) I have noted your remark w.r.t. the versioning. I will get back on that after a discussion with the maintainers.

  10. thediveo commented on Jun 8, 2026

    @thediveo
    Author

    @Kaniska244 tested your PR feature with iptablesSwitchAtRuntime:true as follows...

    ⬇ host \ devcontainer ➡ Ubuntu 26.04 Ubuntu 24.04
    Ubuntu 26.04 ✔️ ✔️
    Ubuntu 24.04 ✔️ ✔️

    (didn't try with iptablesSwitchAtRuntime:false as we know that should fail)

  11. thediveo commented on Jun 25, 2026

    @thediveo
    Author

    Thank you very much for fixing this nasty problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions