Skip to content

The docker-outside-docker feature fails to load #418

@jgbright

Description

@jgbright

I can't get the docker-outside-docker feature to work anymore. This was working for me recently. I have read about workarounds related to how the apt repo is configured, but nothing I have tried works for me.

Repro steps

  1. Open an empty folder in vscode.
  2. Invoke the vscode command Remote-Containers: Add Development Container Configuration Files and then respond to the prompts as follows:
    • Container definition
      C# (.NET)
    • .NET version
      6.0-bullseye (default)
    • Node.js version
      none
    • Additional feature:
      Docker (moby) support (Docker-in-Docker)
    • Docker/Moby engine version
      20.10
  3. Invoke the vscode command Remote-Containers: Rebuild and Reopen in Container

Expected result

I expect the devcontainer to successfully build and open.

Actual result

The devcontainer fails to build and gives an error. Here is the error.

The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.

Here is the full devcontainer log.

Here's a small portion of the end of the log.

------
 > [dev_containers_target_stage 2/2] RUN cd /tmp/build-features/docker-in-docker_1 && set -a && . ./devcontainer-features.env && set +a && chmod +x ./install.sh && ./install.sh:
#0 1.121 DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES=buster bullseye bionic focal jammy
[2023-01-24T21:55:00.293Z] 
#0 1.121 Distro codename  'bullseye'  matched filter  'buster bullseye bionic focal jammy'
#0 1.128 find: '/var/lib/apt/lists/*': No such file or directory
#0 1.128 Running apt-get update...
#0 1.161 Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
#0 1.169 Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
[2023-01-24T21:55:00.293Z] #0 1.169 Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
#0 1.203 Get:4 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
#0 1.271 Get:5 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
#0 1.368 Get:6 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [216 kB]
[2023-01-24T21:55:00.293Z] 
#0 1.466 Get:7 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.6 kB]
#0 1.514 Err:4 https://dl.yarnpkg.com/debian stable InRelease
#0 1.514   The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
[2023-01-24T21:55:00.293Z] 
#0 2.280 Reading package lists...
#0 2.725 W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
#0 2.725 E: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.
[2023-01-24T21:55:00.293Z] ------
[2023-01-24T21:55:00.293Z] ERROR: failed to solve: executor failed running [/bin/sh -c cd /tmp/build-features/docker-in-docker_1 && set -a && . ./devcontainer-features.env && set +a && chmod +x ./install.sh && ./install.sh]: exit code: 100
[2023-01-24T21:55:00.297Z] Stop (8493 ms): Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/vsch-azureuser/container-features/0.251.0-1674597291376/Dockerfile-with-features -t vsc-devcontainer-docker-outside-docker-error-bed6397d70acb3b5890795ea56a2cef4 --target dev_containers_target_stage --build-arg VARIANT=6.0-bullseye --build-arg NODE_VERSION=none --build-context dev_containers_feature_content_source=/tmp/vsch-azureuser/container-features/0.251.0-1674597291376 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /home/azureuser/repos/devcontainer-docker-outside-docker-error/.devcontainer
[2023-01-24T21:55:03.319Z] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/vsch-azureuser/container-features/0.251.0-1674597291376/Dockerfile-with-features -t vsc-devcontainer-docker-outside-docker-error-bed6397d70acb3b5890795ea56a2cef4 --target dev_containers_target_stage --build-arg VARIANT=6.0-bullseye --build-arg NODE_VERSION=none --build-context dev_containers_feature_content_source=/tmp/vsch-azureuser/container-features/0.251.0-1674597291376 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /home/azureuser/repos/devcontainer-docker-outside-docker-error/.devcontainer
[2023-01-24T21:55:03.320Z]     at OF (/home/azureuser/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js:258:1490)
[2023-01-24T21:55:03.320Z]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-01-24T21:55:03.320Z]     at async Wf (/home/azureuser/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js:257:2801)
[2023-01-24T21:55:03.320Z]     at async pb (/home/azureuser/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js:257:1779)
[2023-01-24T21:55:03.320Z]     at async DF (/home/azureuser/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js:263:2006)
[2023-01-24T21:55:03.320Z]     at async to (/home/azureuser/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js:263:3110)
[2023-01-24T21:55:03.320Z]     at async Ak (/home/azureuser/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js:383:8108)
[2023-01-24T21:55:03.321Z]     at async Ok (/home/azureuser/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js:383:7864)
[2023-01-24T21:55:03.327Z] Stop (9153 ms): Run in Host: /home/azureuser/.vscode-server/bin/97dec172d3256f8ca4bfb2143f3f76b503ca0534/node /home/azureuser/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js up --workspace-folder /home/azureuser/repos/devcontainer-docker-outside-docker-error --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/azureuser/repos/devcontainer-docker-outside-docker-error --log-level debug --log-format json --config /home/azureuser/repos/devcontainer-docker-outside-docker-error/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2023-01-24T21:55:03.327Z] Exit code 1
[2023-01-24T21:55:03.331Z] Command failed: /home/azureuser/.vscode-server/bin/97dec172d3256f8ca4bfb2143f3f76b503ca0534/node /home/azureuser/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js up --workspace-folder /home/azureuser/repos/devcontainer-docker-outside-docker-error --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/azureuser/repos/devcontainer-docker-outside-docker-error --log-level debug --log-format json --config /home/azureuser/repos/devcontainer-docker-outside-docker-error/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2023-01-24T21:55:03.331Z] Exit code 1

Metadata

Metadata

Assignees

No one assigned

    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