Dev container fails to start
Opened this issue · 2 comments
perotom commented
Bug description
VS Code throws an error when opening a newly created project with a dev container.
[2024-11-01T10:03:36.690Z] Dev Containers 0.388.0 in VS Code 1.95.1 (65edc4939843c90c34d61f4ce11704f09d3e5cb6).
[2024-11-01T10:03:36.690Z] Start: Resolving Remote
[2024-11-01T10:03:36.702Z] Setting up container for folder or workspace: /Users/username/Documents/Rust/test-software
[2024-11-01T10:03:36.702Z] Context: desktop-linux
[2024-11-01T10:03:36.703Z] Start: Check Docker is running
[2024-11-01T10:03:36.704Z] Start: Run: docker version
[2024-11-01T10:03:36.725Z] Client:
Version: 27.2.0
API version:
[2024-11-01T10:03:36.725Z] 1.47
Go version: go1.21.13
Git commit: 3ab4256
Built: Tue Aug 27 14:14:45 2024
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.34.3 (170107)
Engine:
Version: 27.2.0
API version: 1.47 (minimum version 1.24)
Go version: go1.21.13
Git commit: 3ab5c7d
Built: Tue Aug 27 14:15:41 2024
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.7.20
GitCommit: 8fc6bcff51318944179630522a095cc9dbf9f353
runc:
Version: 1.1.13
GitCommit: v1.1.13-0-g58aa920
docker-init:
Version: 0.19.0
GitCommit: de40ad0
[2024-11-01T10:03:36.727Z] Stop (23 ms): Run: docker version
[2024-11-01T10:03:36.727Z] Stop (24 ms): Check Docker is running
[2024-11-01T10:03:36.728Z] Start: Run: docker volume ls -q
[2024-11-01T10:03:36.740Z] Stop (12 ms): Run: docker volume ls -q
[2024-11-01T10:03:36.740Z] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/Users/username/Documents/Rust/test-software --filter label=vsch.quality=stable
[2024-11-01T10:03:36.752Z] Stop (12 ms): Run: docker ps -q -a --filter label=vsch.local.folder=/Users/username/Documents/Rust/test-software --filter label=vsch.quality=stable
[2024-11-01T10:03:36.752Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/username/Documents/Rust/test-software --filter label=devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json
[2024-11-01T10:03:36.764Z] Stop (12 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/username/Documents/Rust/test-software --filter label=devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json
[2024-11-01T10:03:36.764Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/username/Documents/Rust/test-software
[2024-11-01T10:03:36.775Z] Stop (11 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/username/Documents/Rust/test-software
[2024-11-01T10:03:36.775Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/username/Documents/Rust/test-software
[2024-11-01T10:03:36.787Z] Stop (12 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/username/Documents/Rust/test-software
[2024-11-01T10:03:36.788Z] Running Dev Containers CLI: up --user-data-folder /Users/username/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-946948ea-b831-4daa-8d34-59f2b03337c61730455416273 --workspace-folder /Users/username/Documents/Rust/test-software --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=/Users/username/Documents/Rust/test-software --id-label devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[2024-11-01T10:03:36.801Z] ProxyResolver#loadSystemCertificates count
[2024-11-01T10:03:36.802Z] ProxyResolver#loadSystemCertificates count filtered
[2024-11-01T10:03:36.802Z] Start: Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/username/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-946948ea-b831-4daa-8d34-59f2b03337c61730455416273 --workspace-folder /Users/username/Documents/Rust/test-software --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=/Users/username/Documents/Rust/test-software --id-label devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[2024-11-01T10:03:36.931Z] @devcontainers/cli 0.71.0. Node.js v20.18.0. darwin 23.5.0 arm64.
[2024-11-01T10:03:36.931Z] Start: Run: docker buildx version
[2024-11-01T10:03:36.974Z] Stop (43 ms): Run: docker buildx version
[2024-11-01T10:03:36.974Z] github.com/docker/buildx v0.16.2-desktop.1 081c21b9e461293ae243a1ff813a680a4f5f8fb9
[2024-11-01T10:03:36.975Z]
[2024-11-01T10:03:36.975Z] Start: Run: docker -v
[2024-11-01T10:03:36.989Z] Stop (14 ms): Run: docker -v
[2024-11-01T10:03:36.989Z] Start: Resolving Remote
[2024-11-01T10:03:36.996Z] Loading 11 extra certificates from /var/folders/w1/0j27_v7d3ls0jpf1xj41kgh80000gn/T/vsch/certificates-6a04976dd082fa62c2e87505bf3a2bf499e1642b59a06fae5edbf3115ecdf43c.pem.
[2024-11-01T10:03:37.069Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/username/Documents/Rust/test-software --filter label=devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json
[2024-11-01T10:03:37.088Z] Stop (19 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/username/Documents/Rust/test-software --filter label=devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json
[2024-11-01T10:03:37.090Z] Start: Run: docker inspect --type image debian:bookworm-slim
[2024-11-01T10:03:37.106Z] Stop (16 ms): Run: docker inspect --type image debian:bookworm-slim
[2024-11-01T10:03:37.470Z] Start: Run: docker-credential-desktop get
[2024-11-01T10:03:37.510Z] Stop (40 ms): Run: docker-credential-desktop get
[2024-11-01T10:03:38.779Z] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /var/folders/w1/0j27_v7d3ls0jpf1xj41kgh80000gn/T/devcontainercli/container-features/0.71.0-1730455418774/Dockerfile-with-features -t vsc-test-software-7ae294a181ee9c53755643e8a7510f0227e0f57d3adb9f16db87d933e6e9596a --target dev_containers_target_stage --build-arg CONTAINER_USER=esp --build-arg CONTAINER_GROUP=esp --build-arg ESP_BOARD=esp32s3 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /Users/username/Documents/Rust/test-software/.devcontainer
[2024-11-01T10:03:38.939Z] [+] Building 0.0s (0/1) docker:desktop-linux
[2024-11-01T10:03:39.099Z] [+] Building 0.2s (1/2) docker:desktop-linux
=> [internal] load build definition from Dockerfile-with-features 0.0s
=> => transferring dockerfile: 3.77kB 0.0s
=> [internal] load metadata for docker.io/library/debian:bookworm-slim 0.2s
[2024-11-01T10:03:39.249Z] [+] Building 0.3s (1/2) docker:desktop-linux
=> [internal] load build definition from Dockerfile-with-features 0.0s
=> => transferring dockerfile: 3.77kB 0.0s
=> [internal] load metadata for docker.io/library/debian:bookworm-slim 0.3s
[2024-11-01T10:03:39.249Z]
[2024-11-01T10:03:39.399Z] [+] Building 0.5s (1/2) docker:desktop-linux
=> [internal] load build definition from Dockerfile-with-features 0.0s
[2024-11-01T10:03:39.399Z] => => transferring dockerfile: 3.77kB 0.0s
=> [internal] load metadata for docker.io/library/debian:bookworm-slim 0.5s
[2024-11-01T10:03:39.549Z] [+] Building 0.6s (1/2) docker:desktop-linux
=> [internal] load build definition from Dockerfile-with-features 0.0s
[2024-11-01T10:03:39.549Z] => => transferring dockerfile: 3.77kB 0.0s
=> [internal] load metadata for docker.io/library/debian:bookworm-slim 0.6s
[2024-11-01T10:03:39.698Z]
[2024-11-01T10:03:39.699Z] [+] Building 0.8s (1/2) docker:desktop-linux
=> [internal] load build definition from Dockerfile-with-features 0.0s
=> => transferring dockerfile: 3.77kB 0.0s
=> [internal] load metadata for docker.io/library/debian:bookworm-slim 0.8s
[2024-11-01T10:03:39.849Z] [+] Building 0.9s (1/2) docker:desktop-linux
=> [internal] load build definition from Dockerfile-with-features 0.0s
[2024-11-01T10:03:39.849Z] => => transferring dockerfile: 3.77kB 0.0s
=> [internal] load metadata for docker.io/library/debian:bookworm-slim 0.9s
[2024-11-01T10:03:39.979Z] [+] Building 1.0s (2/2) docker:desktop-linux
=> [internal] load build definition from Dockerfile-with-features 0.0s
[2024-11-01T10:03:39.979Z] => => transferring dockerfile: 3.77kB 0.0s
=> [internal] load metadata for docker.io/library/debian:bookworm-slim 1.0s
[2024-11-01T10:03:40.015Z] [+] Building 1.1s (13/13) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile-with-features 0.0s
=> => transferring dockerfile: 3.77kB 0.0s
=> [internal] load metadata for docker.io/library/debian:bookworm-slim 1.0s
=> [internal] load .dockerignore 0.0s
[2024-11-01T10:03:40.015Z] => => transferring context: 2B 0.0s
=> [dev_container_auto_added_stage_label 1/9] FROM docker.io/library/deb 0.0s
=> CACHED [dev_container_auto_added_stage_label 2/9] RUN apt-get update 0.0s
=> CACHED [dev_container_auto_added_stage_label 3/9] RUN adduser --disab 0.0s
=> CACHED [dev_container_auto_added_stage_label 4/9] WORKDIR /home/esp 0.0s
=> CACHED [dev_container_auto_added_stage_label 5/9] RUN curl --proto '= 0.0s
=> CACHED [dev_container_auto_added_stage_label 6/9] RUN ARCH=$($HOME/.c 0.0s
=> CACHED [dev_container_auto_added_stage_label 7/9] RUN if [ -n "${GITH 0.0s
=> CACHED [dev_container_auto_added_stage_label 8/9] RUN rustup default 0.0s
=> CACHED [dev_container_auto_added_stage_label 9/9] RUN echo "source /h 0.0s
=> exporting to image 0.0s
=> => exporting layers
[2024-11-01T10:03:40.015Z] 0.0s
=> => preparing layers for inline cache 0.0s
=> => writing image sha256:184e960564d003bd37436786fabcccea7c63f16f13a8d 0.0s
=> => naming to docker.io/library/vsc-test-software-7ae294a181ee9c5375 0.0s
[2024-11-01T10:03:40.015Z]
View build details: �]8;;docker-desktop://dashboard/build/desktop-linux/desktop-linux/wx13ccmlmumhgndryrpztqtjz�\docker-desktop://dashboard/build/desktop-linux/desktop-linux/wx13ccmlmumhgndryrpztqtjz�]8;;�\
[2024-11-01T10:03:40.016Z]
[2024-11-01T10:03:40.016Z] 1 warning found (use docker --debug to expand):
- SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "GITHUB_TOKEN") (line 13)
[2024-11-01T10:03:40.206Z]
What's next:
View a summary of image vulnerabilities and recommendations → docker scout quickview
[2024-11-01T10:03:40.209Z] Stop (1430 ms): Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /var/folders/w1/0j27_v7d3ls0jpf1xj41kgh80000gn/T/devcontainercli/container-features/0.71.0-1730455418774/Dockerfile-with-features -t vsc-test-software-7ae294a181ee9c53755643e8a7510f0227e0f57d3adb9f16db87d933e6e9596a --target dev_containers_target_stage --build-arg CONTAINER_USER=esp --build-arg CONTAINER_GROUP=esp --build-arg ESP_BOARD=esp32s3 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /Users/username/Documents/Rust/test-software/.devcontainer
[2024-11-01T10:03:40.211Z] Start: Run: docker events --format {{json .}} --filter event=start
[2024-11-01T10:03:40.213Z] Start: Starting container
[2024-11-01T10:03:40.213Z] Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount source=/Users/username/Documents/Rust/test-software,target=/home/esp/test_software,type=bind,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=/Users/username/Documents/Rust/test-software -l devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --mount type=bind,source=/run/udev,target=/run/udev,readonly --entrypoint /bin/sh vsc-test-software-7ae294a181ee9c53755643e8a7510f0227e0f57d3adb9f16db87d933e6e9596a -c echo Container started
[2024-11-01T10:03:40.235Z] docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /run/udev.
See 'docker run --help'.
[2024-11-01T10:03:40.238Z] Stop (25 ms): Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount source=/Users/username/Documents/Rust/test-software,target=/home/esp/test_software,type=bind,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=/Users/username/Documents/Rust/test-software -l devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --mount type=bind,source=/run/udev,target=/run/udev,readonly --entrypoint /bin/sh vsc-test-software-7ae294a181ee9c53755643e8a7510f0227e0f57d3adb9f16db87d933e6e9596a -c echo Container started
[2024-11-01T10:03:40.238Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/username/Documents/Rust/test-software --filter label=devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json
[2024-11-01T10:03:40.240Z] Stop (29 ms): Run: docker events --format {{json .}} --filter event=start
[2024-11-01T10:03:40.252Z] Stop (14 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/username/Documents/Rust/test-software --filter label=devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json
[2024-11-01T10:03:40.253Z] Error: Command failed: docker run --sig-proxy=false -a STDOUT -a STDERR --mount source=/Users/username/Documents/Rust/test-software,target=/home/esp/test_software,type=bind,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=/Users/username/Documents/Rust/test-software -l devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --mount type=bind,source=/run/udev,target=/run/udev,readonly --entrypoint /bin/sh vsc-test-software-7ae294a181ee9c53755643e8a7510f0227e0f57d3adb9f16db87d933e6e9596a -c echo Container started
[2024-11-01T10:03:40.253Z] trap "exit 0" 15
[2024-11-01T10:03:40.253Z] exec "$@"
[2024-11-01T10:03:40.253Z] while sleep 1 & wait $!; do :; done -
[2024-11-01T10:03:40.253Z] at ytA (/Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/spec-node/devContainersSpecCLI.js:465:1260)
[2024-11-01T10:03:40.253Z] at bH (/Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/spec-node/devContainersSpecCLI.js:465:1002)
[2024-11-01T10:03:40.253Z] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-11-01T10:03:40.253Z] at async TtA (/Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/spec-node/devContainersSpecCLI.js:482:3848)
[2024-11-01T10:03:40.253Z] at async iB (/Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/spec-node/devContainersSpecCLI.js:482:4963)
[2024-11-01T10:03:40.253Z] at async wrA (/Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/spec-node/devContainersSpecCLI.js:663:203)
[2024-11-01T10:03:40.253Z] at async DrA (/Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/spec-node/devContainersSpecCLI.js:662:14830)
[2024-11-01T10:03:40.253Z] at async /Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/spec-node/devContainersSpecCLI.js:482:1190
[2024-11-01T10:03:40.255Z] Stop (3453 ms): Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/username/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-946948ea-b831-4daa-8d34-59f2b03337c61730455416273 --workspace-folder /Users/username/Documents/Rust/test-software --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=/Users/username/Documents/Rust/test-software --id-label devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[2024-11-01T10:03:40.255Z] Exit code 1
[2024-11-01T10:03:40.258Z] Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/username/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/username/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-946948ea-b831-4daa-8d34-59f2b03337c61730455416273 --workspace-folder /Users/username/Documents/Rust/test-software --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=/Users/username/Documents/Rust/test-software --id-label devcontainer.config_file=/Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/username/Documents/Rust/test-software/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[2024-11-01T10:03:40.258Z] Exit code 1
To Reproduce
Steps to reproduce the behavior:
- Run
cargo generate esp-rs/esp-idf-template cargo
- MCU Target: esp32s3
- Enable STD support: True
- ESP-IDF version: v.5.2
- Dev Containers: True
- Wokwi: True
- CI Files: False
- Open in VS Code and choose "
Environment
- OS: MacOS 14.5 (23F79)
SergioGasquez commented
Seems to be the same issue as docker/docs#4709. Tried reproducing it on Linux, no luck
perotom commented
I don't think so. It looks like serialport/serialport-rs#153 brings this issue on MacOS. It tries to mount the folder /run/udev
to detect serial ports but this folder doesn't exist on MacOS. The devcontainer.json looks like:
{
"name": "test-project",
// Select between image and build propieties to pull or build the image.
// "image": "docker.io/espressif/idf-rust:esp32s3_latest",
"build": {
"dockerfile": "Dockerfile",
"args": {
"CONTAINER_USER": "esp",
"CONTAINER_GROUP": "esp",
"ESP_BOARD": "esp32s3"
}
},
// https://github.com/serialport/serialport-rs/issues/153
"runArgs": [
"--mount",
"type=bind,source=/run/udev,target=/run/udev,readonly"
],
"customizations": {
"vscode": {
"settings": {
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.formatOnType": true,
"lldb.executable": "/usr/bin/lldb",
"files.watcherExclude": {
"**/target/**": true
},
"rust-analyzer.checkOnSave.command": "clippy",
"rust-analyzer.checkOnSave.allTargets": false,
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
}
},
"extensions": [
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
"serayuzgur.crates",
"mutantdino.resourcemonitor",
"yzhang.markdown-all-in-one",
"ms-vscode.cpptools",
"actboy168.tasks",
"Wokwi.wokwi-vscode"
]
}
},
"forwardPorts": [
3333,
8000
],
"workspaceMount": "source=${localWorkspaceFolder},target=/home/esp/test-project,type=bind,consistency=cached",
"workspaceFolder": "/home/esp/test-project"
}