bug: `coder_devcontainer` fails with "bind source path does not exist" for existing directories in Kubernetes deployment
- Dominant language
- Go
- Stars
- 14.5k
- Forks
- 1.5k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 601
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Current Behavior
Issue Summary:
The coder_devcontainer resource fails to bind mount directories that demonstrably exist in the filesystem, specifically in Kubernetes deployments with Docker-in-Docker sidecars.
Environment:
- Coder Versions Tested: v2.24.2, v2.25.1 (issue exists in both versions)
- Feature: "native" devcontainer support
- Deployment: Kubernetes with Docker-in-Docker sidecar
- Base Image: codercom/enterprise-base:ubuntu
Problem Description:
coder_devcontainer consistently fails to bind mount directories with the error "bind source path does not exist", even when:
1. The directory exists thanks to PVC (confirmed by git-clone logs showing "already exists and isn't empty, skipping clone!")
2. The directory is accessible to the coder agent
3. The path is correctly specified using the documented ~/folder_name pattern
4. The issue reproduces consistently across workspace restarts and Coder version upgrades
### Relevant Log Output
```shell
Evidence:
✅ Git Clone: "/home/coder/vscode-remote-try-java already exists and isn't empty, skipping clone!"
❌ Docker: "bind source path does not exist: /home/coder/vscode-remote-try-java"
Key insight: The directory clearly exists in the filesystem (git-clone wouldn't skip if it didn't), but Docker cannot bind mount to it,
indicating a path resolution or permission issue between the coder agent container and the Docker-in-Docker sidecar.
Startup script log:
/home/coder/vscode-remote-try-java already exists and isn't empty, skipping clone!
[38;5;79m2025-09-04 21:54:28 - Installing pre-requisites[0m
Get:1 https://download.docker.com/linux/ubuntu noble InRelease [48.8 kB]
Get:2 https://download.docker.com/linux/ubuntu noble/stable amd64 Packages [36.0 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble InRelease [256 kB]
Get:4 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:5 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:7 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu noble InRelease [24.3 kB]
Get:8 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages [1,808 kB]
Get:9 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [23.0 kB]
Get:10 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu noble/main amd64 Packages [2,990 B]
Get:11 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1,408 kB]
Get:12 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [19.3 MB]
Get:13 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages [331 kB]
Get:14 http://archive.ubuntu.com/ubuntu noble/restricted amd64 Packages [117 kB]
Get:15 http://archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [2,269 kB]
Get:16 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [45.2 kB]
Get:17 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1,918 kB]
Get:18 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1,760 kB]
Get:19 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 Packages [48.8 kB]
Get:20 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [35.6 kB]
Get:21 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [2,159 kB]
Get:22 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1,135 kB]
Fetched 33.1 MB in 3s (10.9 MB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20240203).
curl is already the newest version (8.5.0-2ubuntu10.6).
The following additional packages will be installed:
dirmngr gnupg-l10n gnupg-utils gpg-agent gpg-wks-client gpgsm keyboxd
libksba8 pinentry-curses
Suggested packages:
dbus-user-session pinentry-gnome3 tor parcimonie xloadimage gpg-wks-server
scdaemon pinentry-doc
The following NEW packages will be installed:
apt-transport-https dirmngr gnupg gnupg-l10n gnupg-utils gpg-agent
gpg-wks-client gpgsm keyboxd libksba8 pinentry-curses
0 upgraded, 11 newly installed, 0 to remove and 14 not upgraded.
Need to get 1,626 kB of archives.
After this operation, 4,038 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 apt-transport-https all 2.8.3 [3,970 B]
Get:2 http://archive.ubuntu.com/ubuntu noble/main amd64 libksba8 amd64 1.6.6-1build1 [122 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 dirmngr amd64 2.4.4-2ubuntu17.3 [323 kB]
Get:4 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gnupg-utils amd64 2.4.4-2ubuntu17.3 [109 kB]
Get:5 http://archive.ubuntu.com/ubuntu noble/main amd64 pinentry-curses amd64 1.2.1-3ubuntu5 [35.2 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gpg-agent amd64 2.4.4-2ubuntu17.3 [227 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gpgsm amd64 2.4.4-2ubuntu17.3 [232 kB]
Get:8 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 keyboxd amd64 2.4.4-2ubuntu17.3 [78.3 kB]
Get:9 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gnupg all 2.4.4-2ubuntu17.3 [359 kB]
Get:10 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gnupg-l10n all 2.4.4-2ubuntu17.3 [66.4 kB]
Get:11 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gpg-wks-client amd64 2.4.4-2ubuntu17.3 [70.9 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 1,626 kB in 2s (1,068 kB/s)
Selecting previously unselected package apt-transport-https.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 22682 files and directories currently installed.)
Preparing to unpack .../00-apt-transport-https_2.8.3_all.deb ...
Unpacking apt-transport-https (2.8.3) ...
Selecting previously unselected package libksba8:amd64.
Preparing to unpack .../01-libksba8_1.6.6-1build1_amd64.deb ...
Unpacking libksba8:amd64 (1.6.6-1build1) ...
Selecting previously unselected package dirmngr.
Preparing to unpack .../02-dirmngr_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking dirmngr (2.4.4-2ubuntu17.3) ...
Selecting previously unselected package gnupg-utils.
Preparing to unpack .../03-gnupg-utils_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gnupg-utils (2.4.4-2ubuntu17.3) ...
Selecting previously unselected package pinentry-curses.
Preparing to unpack .../04-pinentry-curses_1.2.1-3ubuntu5_amd64.deb ...
Unpacking pinentry-curses (1.2.1-3ubuntu5) ...
Selecting previously unselected package gpg-agent.
Preparing to unpack .../05-gpg-agent_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gpg-agent (2.4.4-2ubuntu17.3) ...
Selecting previously unselected package gpgsm.
Preparing to unpack .../06-gpgsm_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gpgsm (2.4.4-2ubuntu17.3) ...
Selecting previously unselected package keyboxd.
Preparing to unpack .../07-keyboxd_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking keyboxd (2.4.4-2ubuntu17.3) ...
Selecting previously unselected package gnupg.
Preparing to unpack .../08-gnupg_2.4.4-2ubuntu17.3_all.deb ...
Unpacking gnupg (2.4.4-2ubuntu17.3) ...
Selecting previously unselected package gnupg-l10n.
Preparing to unpack .../09-gnupg-l10n_2.4.4-2ubuntu17.3_all.deb ...
Unpacking gnupg-l10n (2.4.4-2ubuntu17.3) ...
Selecting previously unselected package gpg-wks-client.
Preparing to unpack .../10-gpg-wks-client_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gpg-wks-client (2.4.4-2ubuntu17.3) ...
Setting up libksba8:amd64 (1.6.6-1build1) ...
Setting up pinentry-curses (1.2.1-3ubuntu5) ...
Setting up gpg-agent (2.4.4-2ubuntu17.3) ...
Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent.socket → /usr/lib/systemd/user/gpg-agent.socket.
Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent-ssh.socket → /usr/lib/systemd/user/gpg-agent-ssh.socket.
Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent-extra.socket → /usr/lib/systemd/user/gpg-agent-extra.socket.
Created symlink /etc/systemd/user/sockets.target.wants/gpg-agent-browser.socket → /usr/lib/systemd/user/gpg-agent-browser.socket.
Setting up apt-transport-https (2.8.3) ...
Setting up gpgsm (2.4.4-2ubuntu17.3) ...
Setting up dirmngr (2.4.4-2ubuntu17.3) ...
Created symlink /etc/systemd/user/sockets.target.wants/dirmngr.socket → /usr/lib/systemd/user/dirmngr.socket.
Setting up gnupg-l10n (2.4.4-2ubuntu17.3) ...
Setting up keyboxd (2.4.4-2ubuntu17.3) ...
Created symlink /etc/systemd/user/sockets.target.wants/keyboxd.socket → /usr/lib/systemd/user/keyboxd.socket.
Setting up gnupg-utils (2.4.4-2ubuntu17.3) ...
Setting up gpg-wks-client (2.4.4-2ubuntu17.3) ...
Setting up gnupg (2.4.4-2ubuntu17.3) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.5) ...
Hit:1 https://download.docker.com/linux/ubuntu noble InRelease
Get:2 https://deb.nodesource.com/node_22.x nodistro InRelease [12.1 kB]
Hit:3 http://archive.ubuntu.com/ubuntu noble InRelease
Get:4 https://deb.nodesource.com/node_22.x nodistro/main amd64 Packages [7,501 B]
Hit:5 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:6 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:7 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Hit:8 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu noble InRelease
Fetched 19.6 kB in 1s (27.4 kB/s)
Reading package lists...
[1;34m2025-09-04 21:54:39 - Repository configured successfully.[0m
[38;5;79m2025-09-04 21:54:39 - To install Node.js, run: apt-get install nodejs -y[0m
[38;5;79m2025-09-04 21:54:39 - You can use N|solid Runtime as a node.js alternative[0m
[1;32m2025-09-04 21:54:39 - To install N|solid Runtime, run: apt-get install nsolid -y
[0m
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 37.0 MB of archives.
After this operation, 225 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_22.x nodistro/main amd64 nodejs amd64 22.19.0-1nodesource1 [37.0 MB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 37.0 MB in 0s (76.5 MB/s)
Selecting previously unselected package nodejs.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 22861 files and directories currently installed.)
Preparing to unpack .../nodejs_22.19.0-1nodesource1_amd64.deb ...
Unpacking nodejs (22.19.0-1nodesource1) ...
Setting up nodejs (22.19.0-1nodesource1) ...
Processing triggers for man-db (2.12.0-4build2) ...
added 1 package in 1s
npm notice
npm notice New major version of npm available! 10.9.3 -> 11.6.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.6.0
npm notice To update run: npm install -g npm@11.6.0
npm notice
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Waiting for Docker daemon...
Ubuntu 24.04.3 LTS
Installing v4.103.2 of the amd64 release from GitHub.
+ Reusing ~/.cache/code-server/code-server-4.103.2-linux-amd64.tar.gz
+ mkdir -p /tmp/code-server
+ mkdir -p /tmp/code-server/lib /tmp/code-server/bin
+ tar -C /tmp/code-server/lib -xzf ~/.cache/code-server/code-server-4.103.2-linux-amd64.tar.gz
+ mv -f /tmp/code-server/lib/code-server-4.103.2-linux-amd64 /tmp/code-server/lib/code-server-4.103.2
+ ln -fs /tmp/code-server/lib/code-server-4.103.2/bin/code-server /tmp/code-server/bin/code-server
Standalone release has been installed into /tmp/code-server/lib/code-server-4.103.2
Extend your path to use code-server:
PATH="/tmp/code-server/bin:$PATH"
Then run with:
code-server
Deploy code-server for your team with Coder: https://github.com/coder/coder
@devcontainers/cli 0.80.1. Node.js v22.19.0. linux 6.1.141-165.249.amzn2023.x86_64 x64.
Resolving Feature dependencies for 'ghcr.io/devcontainers/features/java:1'...
Soft-dependency 'ghcr.io/devcontainers/features/common-utils' is not required. Removing from installation order...
Files to omit: ''
Run: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-coder/container-features/0.80.1-1757022961805 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/java:1-21 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -f /tmp/devcontainercli-coder/container-features/0.80.1-1757022961805/Dockerfile.extended -t vsc-vscode-remote-try-java-1c8e16e3044a49d02cedce4fc159aea2c3a091b02606496fe5b376da1c27e708-features /tmp/devcontainercli-coder/empty-folder
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile.extended
#1 transferring dockerfile: 3.78kB done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/dockerfile:1.4
#2 DONE 1.0s
#3 docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc
#3 resolve docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc 0.0s done
#3 sha256:ad87fb03593d1b71f9a1cfc1406c4aafcb253b1dabebf569768d6e6166836f34 528B / 528B done
#3 sha256:1e8a16826fd1c80a63fa6817a9c7284c94e40cded14a9b0d0d3722356efa47bd 2.37kB / 2.37kB done
#3 sha256:1328b32c40fca9bcf9d70d8eccb72eb873d1124d72dadce04db8badbe7b08546 0B / 9.94MB 0.1s
#3 sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc 2.00kB / 2.00kB done
#3 sha256:1328b32c40fca9bcf9d70d8eccb72eb873d1124d72dadce04db8badbe7b08546 6.29MB / 9.94MB 0.3s
#3 sha256:1328b32c40fca9bcf9d70d8eccb72eb873d1124d72dadce04db8badbe7b08546 8.39MB / 9.94MB 0.4s
#3 sha256:1328b32c40fca9bcf9d70d8eccb72eb873d1124d72dadce04db8badbe7b08546 9.94MB / 9.94MB 0.4s done
#3 extracting sha256:1328b32c40fca9bcf9d70d8eccb72eb873d1124d72dadce04db8badbe7b08546 0.1s done
#3 DONE 0.6s
#4 [internal] load .dockerignore
#4 transferring context: 2B done
#4 DONE 0.0s
#5 [context dev_containers_feature_content_source] load .dockerignore
#5 transferring dev_containers_feature_content_source: 2B done
#5 DONE 0.0s
#6 [internal] load metadata for mcr.microsoft.com/devcontainers/java:1-21
#6 DONE 0.5s
#7 [context dev_containers_feature_content_source] load from client
#7 transferring dev_containers_feature_content_source: 542.03kB done
#7 DONE 0.0s
#8 [dev_containers_feature_content_normalize 1/3] FROM mcr.microsoft.com/devcontainers/java:1-21@sha256:0af991049cded4b8d5a90d2614289ceec390779ad6a3e4b70957e2b4f3bb1230
#8 resolve mcr.microsoft.com/devcontainers/java:1-21@sha256:0af991049cded4b8d5a90d2614289ceec390779ad6a3e4b70957e2b4f3bb1230 done
#8 sha256:03d24a726d20ec58bb101cd057cd184aa8058c5363772a5e4496d42740b27b6b 22.58kB / 22.58kB done
#8 sha256:f014853ae2033c0e173500a9c5027c3ecffe2ffacbd09b789ac2f2dc63ddaa63 0B / 48.49MB 0.1s
#8 sha256:6d6401b7636bba3fe2d916b154ba44abe2081a737e117b2c736167ca6ea42334 0B / 24.02MB 0.1s
#8 sha256:623bcc8b9a55207fb819eede317e4c041e3becf6faaefa0cba9b45b753743012 0B / 403B 0.1s
#8 sha256:0af991049cded4b8d5a90d2614289ceec390779ad6a3e4b70957e2b4f3bb1230 1.61kB / 1.61kB done
#8 sha256:86af954654ad2a00a2fd2850a47256db53f3552f6ed58f75ae9d94474a07b183 3.34kB / 3.34kB done
#8 sha256:f014853ae2033c0e173500a9c5027c3ecffe2ffacbd09b789ac2f2dc63ddaa63 8.39MB / 48.49MB 0.3s
#8 sha256:623bcc8b9a55207fb819eede317e4c041e3becf6faaefa0cba9b45b753743012 403B / 403B 0.3s
#8 sha256:f014853ae2033c0e173500a9c5027c3ecffe2ffacbd09b789ac2f2dc63ddaa63 46.14MB / 48.49MB 0.5s
#8 sha256:6d6401b7636bba3fe2d916b154ba44abe2081a737e117b2c736167ca6ea42334 14.68MB / 24.02MB 0.5s
#8 sha256:623bcc8b9a55207fb819eede317e4c041e3becf6faaefa0cba9b45b753743012 403B / 403B 0.3s done
#8 sha256:4320a0d12898c14123e83e5bea9b02ca46e41a059256f668404595cd7314c9da 134B / 134B 0.5s done
#8 sha256:25efcb3afa638e739589f0d0ad751bbc0142d3959f32afe3fd99c9fa9f15a596 0B / 223B 0.5s
#8 sha256:6d6401b7636bba3fe2d916b154ba44abe2081a737e117b2c736167ca6ea42334 24.02MB / 24.02MB 0.6s
#8 sha256:25efcb3afa638e739589f0d0ad751bbc0142d3959f32afe3fd99c9fa9f15a596 223B / 223B 0.6s done
#8 extracting sha256:f014853ae2033c0e173500a9c5027c3ecffe2ffacbd09b789ac2f2dc63ddaa63
#8 sha256:f014853ae2033c0e173500a9c5027c3ecffe2ffacbd09b789ac2f2dc63ddaa63 48.49MB / 48.49MB 0.6s done
#8 sha256:6d6401b7636bba3fe2d916b154ba44abe2081a737e117b2c736167ca6ea42334 24.02MB / 24.02MB 0.6s done
#8 sha256:3a8e300d8799b04b781b9ba9ab506397c954d374b5d7d59318ffdc3077351617 0B / 106.52MB 0.7s
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 0B / 168.34MB 0.7s
#8 sha256:2a3b5f79ae706cd8846063b876b6cbc7623a6e7e64a3131a882e527fff1b69cc 232B / 232B 0.7s done
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 9.44MB / 168.34MB 0.8s
#8 sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 0B / 207.35MB 0.8s
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 28.31MB / 168.34MB 0.9s
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 50.33MB / 168.34MB 1.1s
#8 sha256:3a8e300d8799b04b781b9ba9ab506397c954d374b5d7d59318ffdc3077351617 6.29MB / 106.52MB 1.2s
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 69.21MB / 168.34MB 1.2s
#8 sha256:3a8e300d8799b04b781b9ba9ab506397c954d374b5d7d59318ffdc3077351617 20.97MB / 106.52MB 1.3s
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 87.03MB / 168.34MB 1.3s
#8 sha256:3a8e300d8799b04b781b9ba9ab506397c954d374b5d7d59318ffdc3077351617 38.80MB / 106.52MB 1.4s
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 104.86MB / 168.34MB 1.4s
#8 sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 24.12MB / 207.35MB 1.4s
#8 sha256:3a8e300d8799b04b781b9ba9ab506397c954d374b5d7d59318ffdc3077351617 56.62MB / 106.52MB 1.5s
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 122.68MB / 168.34MB 1.5s
#8 sha256:3a8e300d8799b04b781b9ba9ab506397c954d374b5d7d59318ffdc3077351617 74.45MB / 106.52MB 1.6s
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 142.61MB / 168.34MB 1.6s
#8 sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 45.09MB / 207.35MB 1.6s
#8 sha256:3a8e300d8799b04b781b9ba9ab506397c954d374b5d7d59318ffdc3077351617 106.52MB / 106.52MB 1.8s
#8 sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 68.37MB / 207.35MB 1.8s
#8 sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 87.03MB / 207.35MB 1.9s
#8 extracting sha256:f014853ae2033c0e173500a9c5027c3ecffe2ffacbd09b789ac2f2dc63ddaa63 1.4s done
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 166.72MB / 168.34MB 2.1s
#8 sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 123.87MB / 207.35MB 2.1s
#8 sha256:3a8e300d8799b04b781b9ba9ab506397c954d374b5d7d59318ffdc3077351617 106.52MB / 106.52MB 2.2s done
#8 sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 147.85MB / 207.35MB 2.3s
#8 sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 180.36MB / 207.35MB 2.5s
#8 sha256:08c6c60808c050f1ff073f25bc462bc97b480d00b867d44656f205075c52b5c6 0B / 420B 2.8s
#8 sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 198.18MB / 207.35MB 3.0s
#8 sha256:08c6c60808c050f1ff073f25bc462bc97b480d00b867d44656f205075c52b5c6 420B / 420B 2.9s done
#8 extracting sha256:6d6401b7636bba3fe2d916b154ba44abe2081a737e117b2c736167ca6ea42334 0.1s
#8 sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 0B / 32B 3.1s
#8 sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B 3.2s
#8 extracting sha256:6d6401b7636bba3fe2d916b154ba44abe2081a737e117b2c736167ca6ea42334 0.4s done
#8 sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B 3.3s done
#8 sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 168.34MB / 168.34MB 3.8s done
#8 sha256:3ce4d58718b5f254e4c1a304c398b105d19ab87066689e37a3376283033c9b31 0B / 227B 3.8s
#8 sha256:3ce4d58718b5f254e4c1a304c398b105d19ab87066689e37a3376283033c9b31 227B / 227B 4.0s
#8 sha256:3ce4d58718b5f254e4c1a304c398b105d19ab87066689e37a3376283033c9b31 227B / 227B 4.0s done
#8 extracting sha256:623bcc8b9a55207fb819eede317e4c041e3becf6faaefa0cba9b45b753743012
#8 sha256:ad462b89f95f0751a23e402845361fa0da9bcf8cb404686dd9786f8f3c7aff05 245B / 245B 4.2s
#8 extracting sha256:623bcc8b9a55207fb819eede317e4c041e3becf6faaefa0cba9b45b753743012 0.1s done
#8 sha256:ad462b89f95f0751a23e402845361fa0da9bcf8cb404686dd9786f8f3c7aff05 245B / 245B 4.3s done
#8 sha256:fda4dab4fa5a7e1ef58cc93407f5ce70a75b48810aaf9665095dc1e2f5e5c25e 0B / 63.20MB 4.5s
#8 sha256:fda4dab4fa5a7e1ef58cc93407f5ce70a75b48810aaf9665095dc1e2f5e5c25e 16.78MB / 63.20MB 4.6s
#8 sha256:75c6deb78c842ea2b770227fde412c0a5db6dbdd91466b9773bfea983a3ba9e6 0B / 2.58MB 4.7s
#8 sha256:75c6deb78c842ea2b770227fde412c0a5db6dbdd91466b9773bfea983a3ba9e6 2.58MB / 2.58MB 4.9s
#8 sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 207.35MB / 207.35MB 5.0s done
#8 sha256:fda4dab4fa5a7e1ef58cc93407f5ce70a75b48810aaf9665095dc1e2f5e5c25e 26.21MB / 63.20MB 5.1s
#8 sha256:75c6deb78c842ea2b770227fde412c0a5db6dbdd91466b9773bfea983a3ba9e6 2.58MB / 2.58MB 5.0s done
#8 extracting sha256:4320a0d12898c14123e83e5bea9b02ca46e41a059256f668404595cd7314c9da done
#8 sha256:fda4dab4fa5a7e1ef58cc93407f5ce70a75b48810aaf9665095dc1e2f5e5c25e 44.04MB / 63.20MB 5.2s
#8 sha256:ac6ea4b442d1a6cfa8a8ec66ef5a52592f8ff0bf34786fb23509edf5b2cc7c66 0B / 8.24MB 5.2s
#8 sha256:fda4dab4fa5a7e1ef58cc93407f5ce70a75b48810aaf9665095dc1e2f5e5c25e 63.07MB / 63.20MB 5.3s
#8 sha256:ac6ea4b442d1a6cfa8a8ec66ef5a52592f8ff0bf34786fb23509edf5b2cc7c66 8.24MB / 8.24MB 5.4s
#8 extracting sha256:25efcb3afa638e739589f0d0ad751bbc0142d3959f32afe3fd99c9fa9f15a596
#8 extracting sha256:25efcb3afa638e739589f0d0ad751bbc0142d3959f32afe3fd99c9fa9f15a596 done
#8 sha256:ac6ea4b442d1a6cfa8a8ec66ef5a52592f8ff0bf34786fb23509edf5b2cc7c66 8.24MB / 8.24MB 5.7s done
#8 sha256:fda4dab4fa5a7e1ef58cc93407f5ce70a75b48810aaf9665095dc1e2f5e5c25e 63.20MB / 63.20MB 5.9s done
#8 extracting sha256:2a3b5f79ae706cd8846063b876b6cbc7623a6e7e64a3131a882e527fff1b69cc
#8 extracting sha256:2a3b5f79ae706cd8846063b876b6cbc7623a6e7e64a3131a882e527fff1b69cc done
#8 extracting sha256:3a8e300d8799b04b781b9ba9ab506397c954d374b5d7d59318ffdc3077351617
#8 extracting sha256:3a8e300d8799b04b781b9ba9ab506397c954d374b5d7d59318ffdc3077351617 3.2s done
#8 extracting sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61
#8 extracting sha256:48b8584ed239ef63f8635558ea164598f1155994d84005db08b1da16509c5a61 2.8s done
#8 extracting sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2
#8 extracting sha256:1e071cf81b9499caa9eae3133522de851b21d7163a9f1e43dea112c9061276a2 1.6s done
#8 extracting sha256:08c6c60808c050f1ff073f25bc462bc97b480d00b867d44656f205075c52b5c6
#8 extracting sha256:08c6c60808c050f1ff073f25bc462bc97b480d00b867d44656f205075c52b5c6 done
#8 extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 done
#8 extracting sha256:3ce4d58718b5f254e4c1a304c398b105d19ab87066689e37a3376283033c9b31
#8 extracting sha256:3ce4d58718b5f254e4c1a304c398b105d19ab87066689e37a3376283033c9b31 done
#8 extracting sha256:ad462b89f95f0751a23e402845361fa0da9bcf8cb404686dd9786f8f3c7aff05 done
#8 extracting sha256:fda4dab4fa5a7e1ef58cc93407f5ce70a75b48810aaf9665095dc1e2f5e5c25e
#8 extracting sha256:fda4dab4fa5a7e1ef58cc93407f5ce70a75b48810aaf9665095dc1e2f5e5c25e 0.7s done
#8 extracting sha256:75c6deb78c842ea2b770227fde412c0a5db6dbdd91466b9773bfea983a3ba9e6
#8 extracting sha256:75c6deb78c842ea2b770227fde412c0a5db6dbdd91466b9773bfea983a3ba9e6 0.1s done
#8 extracting sha256:ac6ea4b442d1a6cfa8a8ec66ef5a52592f8ff0bf34786fb23509edf5b2cc7c66
#8 extracting sha256:ac6ea4b442d1a6cfa8a8ec66ef5a52592f8ff0bf34786fb23509edf5b2cc7c66 0.3s done
#8 DONE 17.3s
#9 [dev_containers_feature_content_normalize 2/3] COPY --from=dev_containers_feature_content_source devcontainer-features.builtin.env /tmp/build-features/
#9 ...
#10 [dev_containers_target_stage 2/5] RUN mkdir -p /tmp/dev-container-features
#10 DONE 2.4s
#9 [dev_containers_feature_content_normalize 2/3] COPY --from=dev_containers_feature_content_source devcontainer-features.builtin.env /tmp/build-features/
#9 DONE 2.4s
#11 [dev_containers_feature_content_normalize 3/3] RUN chmod -R 0755 /tmp/build-features/
#11 DONE 0.4s
#12 [dev_containers_target_stage 3/5] COPY --from=dev_containers_feature_content_normalize /tmp/build-features/ /tmp/dev-container-features
#12 DONE 0.0s
#13 [dev_containers_target_stage 4/5] RUN echo "_CONTAINER_USER_HOME=$( (command -v getent >/dev/null 2>&1 && getent passwd 'root' || grep -E '^root|^[^:]*:[^:]*:root:' /etc/passwd || true) | cut -d: -f6)" >> /tmp/dev-container-features/devcontainer-features.builtin.env && echo "_REMOTE_USER_HOME=$( (command -v getent >/dev/null 2>&1 && getent passwd 'vscode' || grep -E '^vscode|^[^:]*:[^:]*:vscode:' /etc/passwd || true) | cut -d: -f6)" >> /tmp/dev-container-features/devcontainer-features.builtin.env
#13 DONE 0.8s
#14 [dev_containers_target_stage 5/5] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=java_0,target=/tmp/build-features-src/java_0 cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features && chmod -R 0755 /tmp/dev-container-features/java_0 && cd /tmp/dev-container-features/java_0 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh && rm -rf /tmp/dev-container-features/java_0
#14 0.915 ===========================================================================
#14 0.915 Feature : Java (via SDKMAN!)
#14 0.915 Description : Installs Java, SDKMAN! (if not installed), and needed dependencies.
#14 0.915 Id : ghcr.io/devcontainers/features/java
#14 0.915 Version : 1.6.3
#14 0.915 Documentation : https://github.com/devcontainers/features/tree/main/src/java
#14 0.915 Options :
#14 0.915 VERSION="none"
#14 0.915 ADDITIONALVERSIONS=""
#14 0.915 JDKDISTRO="ms"
#14 0.915 INSTALLGRADLE="false"
#14 0.915 GRADLEVERSION="latest"
#14 0.915 INSTALLMAVEN="true"
#14 0.915 MAVENVERSION="3.8.6"
#14 0.915 INSTALLANT="false"
#14 0.915 ANTVERSION="latest"
#14 0.915 INSTALLGROOVY="false"
#14 0.915 GROOVYVERSION="latest"
#14 0.915 ===========================================================================
#14 1.298 Check if OpenJDK is available for version 3 for ms Distro
#14 1.841 JDK version 3 not available in ms.... Switching to (tem).
#14 1.841 JDK_DISTRO: tem
#14 2.997
#14 2.997 Downloading: maven 3.8.6
#14 2.997
#14 2.997 In progress...
#14 2.997
#14 3.246 #=#=#
1.1%
######################################################################## 100.0%
#14 3.729
#14 3.729 [1;32mInstalling: maven 3.8.6[0m
#14 3.823 [1;32mDone installing![0m
#14 3.823
#14 3.823
#14 3.823 [1;32mSetting maven 3.8.6 as default.[0m
#14 4.091 [1;32m4 archive(s) flushed, freeing 8.4M /usr/local/sdkman/tmp.[0m
#14 4.096 [1;32m1 archive(s) flushed, freeing 0 /usr/local/sdkman/var/metadata.[0m
#14 4.354 [1;32m0 archive(s) flushed, freeing 0 /usr/local/sdkman/tmp.[0m
#14 4.356 Done!
#14 DONE 4.4s
#15 exporting to image
#15 exporting layers 0.1s done
#15 writing image sha256:9253780a3cd10695ebe7f538c8c8b26f0b718ca49b6dbf0ccb18cf9db7b554cc done
#15 naming to docker.io/library/vsc-vscode-remote-try-java-1c8e16e3044a49d02cedce4fc159aea2c3a091b02606496fe5b376da1c27e708-features done
#15 DONE 0.1s
Run: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-coder/container-features/0.80.1-1757022961805 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/java:1-21 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -f /tmp/devcontainercli-coder/container-features/0.80.1-1757022961805/Dockerfile.extended -t vsc-vscode-remote-try-java-1c8e16e3044a49d02cedce4fc159aea2c3a091b02606496fe5b376da1c27e708-features /tmp/devcontainercli-coder/empty-folder
Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/home/coder/vscode-remote-try-java,target=/workspaces/vscode-remote-try-java -l devcontainer.local_folder=/home/coder/vscode-remote-try-java -l devcontainer.config_file=/home/coder/vscode-remote-try-java/.devcontainer/devcontainer.json -e JAVA_HOME=/usr/lib/jvm/msopenjdk-current --entrypoint /bin/sh vsc-vscode-remote-try-java-1c8e16e3044a49d02cedce4fc159aea2c3a091b02606496fe5b376da1c27e708-features-uid -c echo Container started
docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /home/coder/vscode-remote-try-java
Run 'docker run --help' for more information
Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/home/coder/vscode-remote-try-java,target=/workspaces/vscode-remote-try-java -l devcontainer.local_folder=/home/coder/vscode-remote-try-java -l devcontainer.config_file=/home/coder/vscode-remote-try-java/.devcontainer/devcontainer.json -e JAVA_HOME=/usr/lib/jvm/msopenjdk-current --entrypoint /bin/sh vsc-vscode-remote-try-java-1c8e16e3044a49d02cedce4fc159aea2c3a091b02606496fe5b376da1c27e708-features-uid -c echo Container started
```
### Expected Behavior
The "nested" devcontainer should start successfully
### Steps to Reproduce
Steps to Reproduce:
0. Access to a k8s cluster
1. Create/publish the template (or outside of coder with `terraform apply -var="namespace=default"`)
2. Create a workspace from the template
3. Observe git-clone succeeds but devcontainer fails with bind mount error
4. Restart the workspace - git-clone skips (directory exists) but devcontainer still fails
Template source:
```
terraform {
required_providers {
coder = {
source = "coder/coder"
}
kubernetes = {
source = "hashicorp/kubernetes"
}
}
}
provider "coder" {
}
variable "use_kubeconfig" {
type = bool
description = <<-EOF
Use host kubeconfig? (true/false)
Set this to false if the Coder host is itself running as a Pod on the same
Kubernetes cluster as you are deploying workspaces to.
Set this to true if the Coder host is running outside the Kubernetes cluster
for workspaces. A valid "~/.kube/config" must be present on the Coder host.
EOF
default = false
}
variable "namespace" {
type = string
description = "The Kubernetes namespace to create workspaces in (must exist prior to creating workspaces). If the Coder host is itself running as a Pod on the same Kubernetes cluster as you are deploying workspaces to, set this to the same namespace."
}
data "coder_parameter" "cpu" {
name = "cpu"
display_name = "CPU"
description = "The number of CPU cores"
default = "2"
icon = "/icon/memory.svg"
mutable = true
option {
name = "2 Cores"
value = "2"
}
option {
name = "4 Cores"
value = "4"
}
option {
name = "6 Cores"
value = "6"
}
option {
name = "8 Cores"
value = "8"
}
}
data "coder_parameter" "memory" {
name = "memory"
display_name = "Memory"
description = "The amount of memory in GB"
default = "2"
icon = "/icon/memory.svg"
mutable = true
option {
name = "2 GB"
value = "2"
}
option {
name = "4 GB"
value = "4"
}
option {
name = "6 GB"
value = "6"
}
option {
name = "8 GB"
value = "8"
}
}
data "coder_parameter" "home_disk_size" {
name = "home_disk_size"
display_name = "Home disk size"
description = "The size of the home disk in GB"
default = "10"
type = "number"
icon = "/emojis/1f4be.png"
mutable = false
validation {
min = 1
max = 99999
}
}
provider "kubernetes" {
# Authenticate via ~/.kube/config or a Coder-specific ServiceAccount, depending on admin preferences
config_path = var.use_kubeconfig == true ? "~/.kube/config" : null
}
data "coder_workspace" "me" {}
data "coder_workspace_owner" "me" {}
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
startup_script = <<-EOT
set -e
# Install Node.js (required for devcontainers-cli)
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install devcontainers CLI (couldn't get https://registry.coder.com/modules/coder/devcontainers-cli to work unless npm already installed on base image - which it is not)
sudo npm install -g @devcontainers/cli
# Wait for Docker daemon to be ready
while ! docker info >/dev/null 2>&1; do
echo "Waiting for Docker daemon..."
sleep 2
done
# Install the latest code-server.
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
# Start code-server in the background.
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
EOT
startup_script_behavior = "blocking"
# shutdown_script = "sudo service docker stop"
# The following metadata blocks are optional. They are used to display
# information about your workspace in the dashboard. You can remove them
# if you don't want to display any information.
# For basic resources, you can use the `coder stat` command.
# If you need more control, you can write your own script.
metadata {
display_name = "CPU Usage"
key = "0_cpu_usage"
script = "coder stat cpu"
interval = 10
timeout = 1
}
metadata {
display_name = "RAM Usage"
key = "1_ram_usage"
script = "coder stat mem"
interval = 10
timeout = 1
}
metadata {
display_name = "Home Disk"
key = "3_home_disk"
script = "coder stat disk --path $${HOME}"
interval = 60
timeout = 1
}
metadata {
display_name = "CPU Usage (Host)"
key = "4_cpu_usage_host"
script = "coder stat cpu --host"
interval = 10
timeout = 1
}
metadata {
display_name = "Memory Usage (Host)"
key = "5_mem_usage_host"
script = "coder stat mem --host"
interval = 10
timeout = 1
}
metadata {
display_name = "Load Average (Host)"
key = "6_load_host"
# get load avg scaled by number of cores
script = <
Contributor guide
Assessment
This issue has not been assessed yet.