devcontainer up fails with unclear error when specifying non-existent remoteUser
@v-Kaniska244 がすでに取り組んでいます。
2025年4月29日 から。
評価
この issue はまだ評価されていません。
説明
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
- 主要言語
- TypeScript
- スター
- 3k
- フォーク
- 461
- 平均マージ
- 18分
- マージ済み PR(30日)
- 5
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
devcontainers/cli のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
devcontainers/cli#1203 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 68/100
devcontainers/cli#1178 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
devcontainers/cli#1308 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
devcontainers/cli#1307 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
devcontainers/cli#1305 ·
devcontainers/cli の issue をすべて見る
似ている issue
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MetaMask/eth-phishing-detect#296544 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100