リモートPC上のDockerコンテナにVSCodeのDevContainerで接続出来ない。
解決したいこと
Windows PCからラズパイのDockerコンテナにVSCodeのDevContainerの機能で接続したいのですが、出来ません。
ラズパイ単体でのDockerコンテナの起動、秘密鍵を使ったSSH接続等の諸々の設定は済んでいる状態です。
VSCodeには以下の拡張機能を入れています。(必要そうなものだけ挙げています)
* Remote Development
* Remote - SSH
* Remote - SSH: Editing Configuration Files
* Remote - Tunnels
* Dev Containers
- WSL2
>wsl --status
既定の配布: Ubuntu-20.04
既定のバージョン: 2
Linux 用 Windows サブシステムの最終更新日: 2021/01/31
Linux 用 Windows サブシステム カーネルは、'wsl --update' を使用して手動で更新できますが、システム設定が原因で自動更新が発生することはありません。
カーネルの自動更新を受け取るには、 Windows Update の設定を有効にしてください:' Windowsの更新に、その他のMicrosoftの製品の更新情報を受け取る'。
詳細については、 https://aka.ms/wsl2kernel.
を参照してください
カーネル バージョン: 5.4.72
- Docker
docker -v
Docker version 24.0.2, build cb74dfc
発生している問題・エラー
Dockerコンテナのビルド完了後、アタッチしようとしている?ようなタイミングでエラーが出ています。
ラズパイ上ではVSCodeが起動させたコンテナが存在しており、中身を確認したところ/root/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node
は存在していました。
なので、VSCodeがラズパイ上ではなくWindowsでコンテナにアタッチしようとしているんではないかと思っていますが、正直よく分かっていません。
以下がログの全文です。長いので折りたたみます。
[31 ms] Dev Containers 0.299.0 in VS Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771).
[31 ms] Start: リモートの解決
[54 ms] Start: Run: ssh Ras4 /bin/sh
[66 ms] Start: Run in host: id -un
[909 ms] hoge
[909 ms]
[910 ms] Start: Run in host: cat /etc/passwd
[916 ms] Start: Run in host: echo ~
[971 ms] /home/hoge
[971 ms]
[971 ms] Start: Run in host: test -x '/home/hoge/.vscode-remote-containers/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node'
[1019 ms]
[1019 ms]
[1019 ms] Exit code 1
[1019 ms] Start: Run in host: test -x '/home/hoge/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node'
[1065 ms]
[1065 ms]
[1065 ms] Start: Run in host: test -f '/home/hoge/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node_modules/node-pty/package.json'
[1113 ms]
[1113 ms]
[1113 ms] Start: Run in host: test -f '/home/hoge/.vscode-remote-containers/dist/vscode-remote-containers-server-0.299.0.js'
[1160 ms]
[1160 ms]
[1164 ms] userEnvProbe: loginInteractiveShell (default)
[1164 ms] userEnvProbe: not found in cache
[1164 ms] userEnvProbe shell: /bin/bash
[1679 ms] userEnvProbe PATHs:
Probe: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games'
Container: None
[1729 ms] Setting up container for folder or workspace: /home/hoge/fuga
[1729 ms] Host: ssh://Ras4
[1730 ms] Start: Run: wsl -l -v
[1764 ms] Start: Run: wsl -d Ubuntu-20.04 -e /bin/sh -c echo ~
[1837 ms] Start: Run: wsl -d Ubuntu-20.04 -e /bin/sh -c cd '/home/user' && /bin/sh
[1842 ms] Start: Run in host: id -un
[1879 ms] user
[1880 ms]
[1880 ms] Start: Run in host: cat /etc/passwd
[1881 ms] Start: Run in host: echo ~
[1882 ms] /home/user
[1882 ms]
[1882 ms] Start: Run in host: test -x '/home/user/.vscode-remote-containers/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node'
[1883 ms]
[1883 ms]
[1883 ms] Start: Run in host: test -f '/home/user/.vscode-remote-containers/dist/vscode-remote-containers-server-0.299.0.js'
[1884 ms]
[1884 ms]
[1884 ms] userEnvProbe: loginInteractiveShell (default)
[1885 ms] userEnvProbe: not found in cache
[1885 ms] userEnvProbe shell: /bin/bash
[1978 ms] userEnvProbe PATHs:
Probe: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Microsoft/jdk-11.0.16.101-hotspot/bin:/mnt/c/Program Files/Eclipse Foundation/jdk-8.0.302.8-hotspot/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/:/mnt/c/Program Files (x86)/Brackets/command:/mnt/c/Python/:/mnt/c/Python/Scripts/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/Smart Projects/IsoBuster:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/WinMerge:/mnt/c/Program Files/Android/Android Studio/jre:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/CMake/bin:/mnt/c/Program Files/Android Game Development Extension/bin/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn/:/mnt/c/Program Files/TortoiseGit/bin:/mnt/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/mnt/c/Program Files (x86)/Incredibuild:/mnt/c/Users/UserName/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/UserName/AppData/Local/atom/bin:/mnt/c/Users/UserName/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/UserName/AppData/Roaming/npm:/mnt/c/Users/UserName/.dotnet/tools:/mnt/c/Users/UserName/AppData/Local/Android/Sdk/platform-tools:/mnt/c/Users/UserName/AppData/Local/Android/Sdk/tools:/mnt/c/Program Files/Android/Android Studio/jre:/mnt/c/Users/UserName/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin'
Container: None
[1981 ms] Start: Check Docker is running
[1981 ms] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[2187 ms] Server API version: 1.43
[2188 ms] Start: Run in Host: docker volume ls -q
[2298 ms] Start: Run in Host: docker ps -q -a --filter label=vsch.local.folder=/home/hoge/fuga --filter label=vsch.quality=stable
[2412 ms] Start: Run in Host: docker ps -q -a --filter label=devcontainer.local_folder=/home/hoge/fuga --filter label=devcontainer.config_file=/home/hoge/fuga/.devcontainer/devcontainer.json
[2662 ms] Start: Run in Host: docker inspect --type container 2ccbb0325444
[2885 ms] Start: Run in Host: docker ps -q -a --filter label=devcontainer.local_folder=/home/hoge/fuga
[3059 ms] Start: Run in Host: docker inspect --type container 2ccbb0325444
[3278 ms] Start: Run in Host: docker exec -i -u root 2ccbb03254443acc405e6b2fefaa37bec6d082c4036b50b7d14a4f48dad5a9dc /bin/sh -c echo "Container already running. Keep-alive process started." ; export VSCODE_REMOTE_CONTAINERS_SESSION=578cf0aa-209d-42f4-9f9b-1ff207d35c611690371076192 ; /bin/sh
[3769 ms] Container already running. Keep-alive process started.
[3770 ms] Start: Run in Host: /home/hoge/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node /home/hoge/.vscode-remote-containers/dist/dev-containers-cli-0.299.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /home/hoge/fuga --id-label devcontainer.local_folder=/home/hoge/fuga --id-label devcontainer.config_file=/home/hoge/fuga/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/hoge/fuga/.devcontainer/devcontainer.json --mount-workspace-git-root true
[-192759 ms] @devcontainers/cli 0.46.0. Node.js v16.17.1. linux 6.1.21-v8+ arm.
[-192760 ms] Start: Run: git rev-parse --show-cdup
[-192730 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/hoge/fuga --filter label=devcontainer.config_file=/home/hoge/fuga/.devcontainer/devcontainer.json
[-192676 ms] Start: Run: docker inspect --type container 2ccbb0325444
[5659 ms] Start: Run in Host: /home/hoge/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node /home/hoge/.vscode-remote-containers/dist/dev-containers-cli-0.299.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-578cf0aa-209d-42f4-9f9b-1ff207d35c611690371076192 --workspace-folder /home/hoge/fuga --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/hoge/fuga --id-label devcontainer.config_file=/home/hoge/fuga/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/hoge/fuga/.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 true --terminal-columns 154 --terminal-rows 21
[-190892 ms] @devcontainers/cli 0.46.0. Node.js v16.17.1. linux 6.1.21-v8+ arm.
[-190892 ms] Start: Run: docker buildx version
[-190664 ms] github.com/docker/buildx v0.11.1 b4df085
[-190663 ms]
[-190662 ms] Start: Resolving Remote
[-190651 ms] Start: Run: git rev-parse --show-cdup
[-190487 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/hoge/fuga --filter label=devcontainer.config_file=/home/hoge/fuga/.devcontainer/devcontainer.json
[-190427 ms] Start: Run: docker inspect --type container 2ccbb0325444
[-190366 ms] Start: Inspecting container
[-190365 ms] Start: Run: docker inspect --type container 2ccbb03254443acc405e6b2fefaa37bec6d082c4036b50b7d14a4f48dad5a9dc
[-190303 ms] Start: Run in container: /bin/sh
[-190289 ms] Start: Run in container: uname -m
[-190105 ms] aarch64
[-190104 ms]
[-190104 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[-190097 ms] PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
[-190096 ms]
[-190095 ms] Start: Run in container: cat /etc/passwd
[-190085 ms] Start: Run in container: test -f '/var/devcontainer/.patchEtcEnvironmentMarker'
[-190082 ms]
[-190081 ms]
[-190080 ms] Start: Run in container: test -f '/var/devcontainer/.patchEtcProfileMarker'
[-190077 ms]
[-190077 ms]
[7536 ms] Start: Run in Host: docker inspect --type container 2ccbb03254443acc405e6b2fefaa37bec6d082c4036b50b7d14a4f48dad5a9dc
[7753 ms] Start: Run in Host: /home/hoge/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node /home/hoge/.vscode-remote-containers/dist/dev-containers-cli-0.299.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /home/hoge/fuga --id-label devcontainer.local_folder=/home/hoge/fuga --id-label devcontainer.config_file=/home/hoge/fuga/.devcontainer/devcontainer.json --container-id 2ccbb03254443acc405e6b2fefaa37bec6d082c4036b50b7d14a4f48dad5a9dc --log-level debug --log-format json --config /home/hoge/fuga/.devcontainer/devcontainer.json --include-merged-configuration --mount-workspace-git-root true
[-188940 ms] @devcontainers/cli 0.46.0. Node.js v16.17.1. linux 6.1.21-v8+ arm.
[-188940 ms] Start: Run: git rev-parse --show-cdup
[-188910 ms] Start: Run: docker inspect --type container 2ccbb03254443acc405e6b2fefaa37bec6d082c4036b50b7d14a4f48dad5a9dc
[8797 ms] Start: Inspecting container
[8797 ms] Start: Run in Host: docker inspect --type container 2ccbb03254443acc405e6b2fefaa37bec6d082c4036b50b7d14a4f48dad5a9dc
[8870 ms] Start: Run in Host: docker exec -i -u root -e VSCODE_REMOTE_CONTAINERS_SESSION=578cf0aa-209d-42f4-9f9b-1ff207d35c611690371076192 2ccbb03254443acc405e6b2fefaa37bec6d082c4036b50b7d14a4f48dad5a9dc /bin/sh
[8924 ms] Start: Run in container: uname -m
[9144 ms] aarch64
[9145 ms]
[9145 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[9193 ms] PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
[9193 ms]
[9193 ms] Start: Run in container: cat /etc/passwd
[9288 ms] Start: Setup shutdown monitor
[9288 ms] Forking shutdown monitor: c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\shutdown\shutdownMonitorProcess \\.\pipe\vscode-remote-containers-09bd49eb-9ed1-49ee-a037-81f7d119edf0-sock singleContainer Debug c:\Users\UserName\AppData\Roaming\Code\logs\20230726T202555\window1\exthost\ms-vscode-remote.remote-containers 1690371076804
[9296 ms] Start: Run in container: test -d /root/.vscode-server
[9349 ms]
[9350 ms]
[9350 ms] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[9399 ms]
[9399 ms]
[9399 ms] Exit code 1
[9399 ms] Start: Run in container: cat /root/.vscode-server/data/Machine/settings.json
[9494 ms]
[9494 ms] cat: /root/.vscode-server/data/Machine/settings.json: No such file or directory
[9494 ms] Exit code 1
[9494 ms]
Support for ARM64 is in preview.
[9494 ms] Start: Run in container: test -d /root/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771
[9602 ms]
[9602 ms]
[9602 ms] Start: Run in container: test -d /vscode/vscode-server/bin/linux-arm64/74f6148eb9ea00507ec113ec51c489d6ffb4b771
[9698 ms]
[9698 ms]
[9699 ms] Start: Run in container: touch '/vscode/vscode-server/bin/linux-arm64/74f6148eb9ea00507ec113ec51c489d6ffb4b771'
[9699 ms] Start: Launching Dev Containers helper.
[9699 ms] ssh-agent: SSH_AUTH_SOCK not set on ssh host.
[9699 ms] ssh-agent: SSH_AUTH_SOCK not set on local host.
[9700 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-d1994442-1f61-4355-96ec-224c29327746.sock) forwarded to local host (\\.\pipe\openssh-ssh-agent).
[9700 ms] X11 forwarding: DISPLAY not set on ssh host.
[9700 ms] X11 forwarding: DISPLAY not set on local host.
[9700 ms] X11 forwarding: DISPLAY not set on wsl host.
[9790 ms]
[9791 ms]
[9791 ms] Start: Run in container: gpgconf --list-dir agent-socket
[9885 ms] /root/.gnupg/S.gpg-agent
[9886 ms]
[9886 ms] Start: Run in container: gpgconf --list-dir homedir
[9979 ms] /root/.gnupg
[9979 ms]
[9980 ms] Start: Run in container: ls '/root/.gnupg/private-keys-v1.d' 2>/dev/null
[10075 ms]
[10075 ms]
[10075 ms] Exit code 2
[10075 ms] Start: Run in Host: gpgconf --list-dir agent-extra-socket
[10234 ms] /run/user/1000/gnupg/S.gpg-agent.extra
[10234 ms]
[10235 ms] Start: Run in container: mkdir -p -m 700 '/root/.gnupg'
[10235 ms] gpg-agent: Socket in container (/root/.gnupg/S.gpg-agent) forwarded to ssh host (/run/user/1000/gnupg/S.gpg-agent.extra).
[10329 ms]
[10330 ms]
[10330 ms] Start: Run in container: command -v docker >/dev/null 2>&1
[10330 ms] Start: Run in Host: gpgconf --list-dir homedir
[10391 ms]
[10391 ms]
[10391 ms] Exit code 127
[10391 ms] Start: Run in Host: docker exec -i -u root 2ccbb03254443acc405e6b2fefaa37bec6d082c4036b50b7d14a4f48dad5a9dc /bin/sh
[10392 ms] userEnvProbe: loginInteractiveShell (default)
[10392 ms] Start: Run in container: test -f '/tmp/devcontainers-578cf0aa-209d-42f4-9f9b-1ff207d35c611690371076192/env-loginInteractiveShell.json'
[10429 ms] /home/hoge/.gnupg
[10429 ms]
[10430 ms] Start: Run in container: echo ~
[10430 ms]
[10430 ms]
[10430 ms] Exit code 1
[10430 ms] Start: Run in container: gpgconf --list-dir homedir
[10430 ms] userEnvProbe: not found in cache
[10430 ms] userEnvProbe shell: /bin/bash
[10536 ms] /root/.gnupg
[10536 ms]
[10536 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /root/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node /tmp/vscode-remote-containers-d1994442-1f61-4355-96ec-224c29327746.js git-credential-helper $*; }; f' || true
[10595 ms]
[10595 ms]
[10595 ms] Start: Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd || echo ; readlink /proc/$pid/ns/mnt || echo ; cat /proc/$pid/stat | tr "
[10669 ms] /root
[10669 ms]
[10670 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-d1994442-1f61-4355-96ec-224c29327746.js' >/tmp/vscode-remote-containers-d1994442-1f61-4355-96ec-224c29327746.js
[10693 ms]
[10693 ms]
[10693 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-d1994442-1f61-4355-96ec-224c29327746.js' >/tmp/vscode-remote-containers-server-d1994442-1f61-4355-96ec-224c29327746.js_1690371087497
[10710 ms] Start: Run in Host: gpg-connect-agent updatestartuptty /bye
[10733 ms]
[10733 ms]
[10747 ms] Container server: /bin/sh: 32: /root/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node: not found
[10754 ms] Error: stream ended with:0 but wanted:9
at c (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:102284)
at c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:102465
at s (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:27:5371)
at Stream.<anonymous> (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:27:5541)
at Stream.emit (node:events:513:28)
at g (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:27:7426)
at Ek.e.read (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:109349)
at So._onstream (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:108625)
at So.write (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:107582)
at c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:109585
at c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:95068
at c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:97674
at Object.cb (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:104250)
at c (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:102133)
at l (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:102395)
at d.read (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:102763)
at Object.cb (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:104150)
at c (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:102133)
at l (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:102395)
at c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:24:102478
at s (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:27:5371)
at Socket.<anonymous> (c:\Users\UserName\.vscode\extensions\ms-vscode-remote.remote-containers-0.299.0\dist\extension\extension.js:27:5472)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
[10755 ms] Container server terminated (code: 127, signal: null).
[10849 ms] Start: Run in container: mkdir -p '/tmp/devcontainers-578cf0aa-209d-42f4-9f9b-1ff207d35c611690371076192' && cat > '/tmp/devcontainers-578cf0aa-209d-42f4-9f9b-1ff207d35c611690371076192/env-loginInteractiveShell.json' << 'envJSON'
[10943 ms]
[10944 ms]
[10944 ms] Start: Run in container: cat '/root/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/product.json'
[11023 ms] Start: Run in container: cat '/root/.vscode-server/data/Machine/.connection-token-74f6148eb9ea00507ec113ec51c489d6ffb4b771' 2>/dev/null || (umask 377 && echo '316c842a-781e-4d64-ae91-1c63887fbd0d' >'/root/.vscode-server/data/Machine/.connection-token-74f6148eb9ea00507ec113ec51c489d6ffb4b771-4e650086-145d-4e33-996c-c67ce872e620' && mv -n '/root/.vscode-server/data/Machine/.connection-token-74f6148eb9ea00507ec113ec51c489d6ffb4b771-4e650086-145d-4e33-996c-c67ce872e620' '/root/.vscode-server/data/Machine/.connection-token-74f6148eb9ea00507ec113ec51c489d6ffb4b771' && rm -f '/root/.vscode-server/data/Machine/.connection-token-74f6148eb9ea00507ec113ec51c489d6ffb4b771-4e650086-145d-4e33-996c-c67ce872e620' && cat '/root/.vscode-server/data/Machine/.connection-token-74f6148eb9ea00507ec113ec51c489d6ffb4b771')
[11133 ms] 51355cbe-bd8c-4188-8d95-6dbc594084e8
[11133 ms]
[11133 ms] Start: Starting VS Code Server
[11134 ms] Start: Preparing Extensions
[11134 ms] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.installExtensionsMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null
[11228 ms]
[11228 ms]
[11229 ms] Exit code 1
[11230 ms] Extensions cache, install extensions: None
[11230 ms] Start: Run in container: test -d /root/.vscode-server/extensionsCache && ls /root/.vscode-server/extensionsCache || true
[11324 ms]
[11324 ms]
[11324 ms] Start: Run in container: test -d /vscode/vscode-server/extensionsCache && ls /vscode/vscode-server/extensionsCache || true
[11419 ms]
[11420 ms]
[11420 ms] Extensions cache, link in container: None
[11420 ms] Optimizing extensions for quality: stable
[11420 ms] Start: Run in Host: docker exec -i -u root -e SHELL=/bin/bash -e VSCODE_AGENT_FOLDER=/root/.vscode-server -w /root/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771 2ccbb03254443acc405e6b2fefaa37bec6d082c4036b50b7d14a4f48dad5a9dc /root/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/bin/code-server --log debug --force-disable-user-env --server-data-dir /root/.vscode-server --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /root/.vscode-server/data/Machine/.connection-token-74f6148eb9ea00507ec113ec51c489d6ffb4b771 --extensions-download-dir /root/.vscode-server/extensionsCache --start-server
[11618 ms] Command failed: /root/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/bin/code-server --log debug --force-disable-user-env --server-data-dir /root/.vscode-server --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /root/.vscode-server/data/Machine/.connection-token-74f6148eb9ea00507ec113ec51c489d6ffb4b771 --extensions-download-dir /root/.vscode-server/extensionsCache --start-server
[11618 ms] /root/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/bin/code-server: 12: /vscode/vscode-server/bin/linux-arm64/74f6148eb9ea00507ec113ec51c489d6ffb4b771/node: not found
[11618 ms] Exit code 127
やったこと
-
上記エラーを起こす際、以下の手順で行いました。
-
下記記事の内容に従い
docker context
なるものも設定済みです。
VS CodeのDevContainerをVMなどssh接続先で使う
>docker context ls
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default moby Current DOCKER_HOST based configuration npipe:////./pipe/docker_engine
desktop-linux moby Docker Desktop npipe:////./pipe/dockerDesktopLinuxEngine
ras4 * moby ssh://hoge@ip:port
WSL上のDockerコンテナに接続できるのは確認できました。なので、SSH関連?
0