devcontainer up fails with unclear error when specifying non-existent remoteUser
@v-Kaniska244 đang làm issue này rồi.
Từ ngày 29/4/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
When creating a devcontainer with a removeUser that does not exist in the container, devcontainer up fails without a clear error
The log output contains
Shell server terminated (code: 126, signal: null)
no users found
for one of the commands and exits with a generic error message in the final result. We use --log-format=json, and those lines are plain text, so aren't getting parsed and shown in the build output
To reproduce
Can reproduce with the following devcontainer.json:
{
"image": "mcr.microsoft.com/vscode/devcontainers/python:3.10-bullseye",
"remoteUser": "foobar"
}
Logs:
$ devcontainer up --workspace-folder . --config .devcontainer/devcontainer.json --log-format=json
...
{"type":"start","level":2,"timestamp":1744618710700,"text":"Run: docker inspect --type container 240a168268e3"}
{"type":"stop","level":2,"timestamp":1744618710714,"text":"Run: docker inspect --type container 240a168268e3","startTimestamp":1744618710700}
{"type":"start","level":2,"timestamp":1744618710715,"text":"Inspecting container"}
{"type":"start","level":2,"timestamp":1744618710715,"text":"Run: docker inspect --type container 240a168268e39df374572d62dce4ff61599028711968f99e66c14d248f5a1fe7"}
{"type":"stop","level":2,"timestamp":1744618710731,"text":"Run: docker inspect --type container 240a168268e39df374572d62dce4ff61599028711968f99e66c14d248f5a1fe7","startTimestamp":1744618710715}
{"type":"stop","level":2,"timestamp":1744618710731,"text":"Inspecting container","startTimestamp":1744618710715}
{"type":"start","level":2,"timestamp":1744618710732,"text":"Run in container: /bin/sh"}
{"type":"start","level":2,"timestamp":1744618710734,"text":"Run in container: uname -m"}
{"type":"stop","level":2,"timestamp":1744618710753,"text":"Run in container: /bin/sh","startTimestamp":1744618710732}
Shell server terminated (code: 126, signal: null)
no users found
{"type":"start","level":2,"timestamp":1744618710754,"text":"Run in container: (command -v getent >/dev/null 2>&1 && getent passwd 'foobar' || grep -E '^foobar|^[^:]*:[^:]*:foobar:' /etc/passwd || true)"}
{"type":"text","level":2,"timestamp":1744618710754,"text":"Stdin closed!"}
Error: An error occurred setting up the container.
at D6 (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:467:1253)
at Ix (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:467:997)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async H6 (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:484:3842)
at async BC (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:484:4957)
at async d7 (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:665:202)
at async f7 (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:664:14804)
at async /usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:484:1188
{"outcome":"error","message":"An error occurred setting up the container.","description":"An error occurred setting up the container.","containerId":"240a168268e39df374572d62dce4ff61599028711968f99e66c14d248f5a1fe7"}
devcontainer CLI version: 0.75.0
OS: Ubuntu 24.04.2 LTS
Docker version: Docker version 27.5.1, build 9f9e405
- Ngôn ngữ chính
- TypeScript
- Star
- 3k
- Fork
- 461
- Merge trung bình
- 18 phút
- Pull request đã merge (30 ngày)
- 5
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của devcontainers/cli
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
devcontainers/cli#1203 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
devcontainers/cli#1178 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
devcontainers/cli#1308 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
devcontainers/cli#1307 · 1 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
devcontainers/cli#1305 ·
Tất cả issue của devcontainers/cli
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100