microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 291 forks source link

Adding Env variables to `${containerEnv:PATH}` via `remoteEnv` in `devcontainer.json` breaks `$PATH` in Container #6903

Closed ontoneio closed 2 years ago

ontoneio commented 2 years ago

[+] Building 53.5s (13/13) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for mcr.microsoft.com/vscode/devcontainers/b 0.1s => [internal] load build context 0.0s => => transferring context: 304B 0.0s => CACHED [1/7] FROM mcr.microsoft.com/vscode/devcontainers/base:0-bulls 0.0s => [2/7] COPY tools/setup/library-scripts/.sh /tmp/library-scripts/ 0.1s => [3/7] RUN apt-get update && /bin/bash /tmp/library-scripts/common-de 42.8s => [4/7] RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39 6.5s => [5/7] RUN . "/home/vscode/.nvm/nvm.sh" && nvm install 16.15.1 1.3s => [6/7] RUN . "/home/vscode/.nvm/nvm.sh" && nvm use v16.15.1 1.0s => [7/7] RUN . "/home/vscode/.nvm/nvm.sh" && nvm alias default v16.15.1 0.6s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:ee806d8779d891bb5d75e9a2484c8cf91b79633500c7e 0.0s => => naming to docker.io/library/vsc-devcontainer-bug-01d0735390a5e877c 0.0s => exporting cache 0.0s => => preparing build cache for export 0.0s [56941 ms] Start: Run: docker inspect --type image vsc-devcontainer-bug-01d0735390a5e877c0358ab6282a7b57 [57184 ms] Start: Run: docker events --format {{json .}} --filter event=start [57230 ms] Start: Starting container [57230 ms] Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug,target=/workspaces/devcontainer-bug,consistency=cached --mount source=devcontainer-bug,target=/workspaces/devcontainer-bug/node_modules,type=volume --mount source=/var/run/docker.sock,target=/var/run/docker-host.sock,type=bind --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug -e GLOBAL_DEPS=/workspaces/devcontainer-bug/node_modules/.bin --entrypoint /bin/sh vsc-devcontainer-bug-01d0735390a5e877c0358ab6282a7b57 -c echo Container started Container started [58063 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug [58316 ms] Start: Run: docker inspect --type container 794190ea87fd [58579 ms] Start: Inspecting container [58579 ms] Start: Run: docker inspect --type container 794190ea87fd98bb27f2fb55dc3b81b489981c721253b3908c41e0e41c53ef08 [58818 ms] Start: Run in container: /bin/sh [58858 ms] Start: Run in container: uname -m [59564 ms] x86_64 [59564 ms] [59564 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null [59567 ms] PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" [59567 ms] [59568 ms] Start: Run in container: cat /etc/passwd [59571 ms] Start: Run in container: test -f '/var/devcontainer/.patchEtcEnvironmentMarker' [59573 ms] [59573 ms] [59573 ms] Exit code 1 [59574 ms] Start: Run in container: test ! -f '/var/devcontainer/.patchEtcEnvironmentMarker' && set -o noclobber && mkdir -p '/var/devcontainer' && { > '/var/devcontainer/.patchEtcEnvironmentMarker' ; } 2> /dev/null [59577 ms] [59577 ms] [59577 ms] Start: Run in container: cat >> /etc/environment <<'etcEnvrionmentEOF' [59581 ms] [59581 ms] [59581 ms] Start: Run in container: test -f '/var/devcontainer/.patchEtcProfileMarker' [59583 ms] [59583 ms] [59583 ms] Exit code 1 [59583 ms] Start: Run in container: test ! -f '/var/devcontainer/.patchEtcProfileMarker' && set -o noclobber && mkdir -p '/var/devcontainer' && { > '/var/devcontainer/.patchEtcProfileMarker' ; } 2> /dev/null [59586 ms] [59586 ms] [59586 ms] Start: Run in container: sed -i -E 's/((^|\s)PATH=)([^\$])$/\1${PATH:-\3}/g' /etc/profile || true [59589 ms] [59589 ms] [59625 ms] Start: Run: docker inspect --type container 794190ea87fd98bb27f2fb55dc3b81b489981c721253b3908c41e0e41c53ef08 [59876 ms] Start: Run: C:\Program Files\Microsoft VS Code\Code.exe c:\Users\jonmitch.vscode\extensions\ms-vscode-remote.remote-containers-0.238.3\dist\spec-node\devContainersSpecCLI.js read-configuration --workspace-folder c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug --log-level debug --log-format json --config c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug.devcontainer\devcontainer.json --mount-workspace-git-root true [60059 ms] remote-containers 0.238.3. [60059 ms] Start: Run: git rev-parse --show-cdup [60184 ms] Start: Inspecting container [60184 ms] Start: Run: docker inspect --type container 794190ea87fd98bb27f2fb55dc3b81b489981c721253b3908c41e0e41c53ef08 [60419 ms] Start: Run in container: /bin/sh [60461 ms] Start: Run in container: uname -m [60772 ms] x86_64 [60773 ms] [60773 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null [60775 ms] PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" [60776 ms] [60776 ms] Start: Run in container: cat /etc/passwd [60780 ms] Start: Updating configuration state [60787 ms] Start: Setup shutdown monitor [60788 ms] Forking shutdown monitor: c:\Users\jonmitch.vscode\extensions\ms-vscode-remote.remote-containers-0.238.3\dist\shutdown\shutdownMonitorProcess \.\pipe\vscode-remote-containers-43190652d7a56acba650b4fe5e82505639ed8541-sock singleContainer Debug c:\Users\jonmitch\AppData\Roaming\Code\logs\20220707T153002\exthost1\ms-vscode-remote.remote-containers 1657238155297 [60802 ms] Start: Run in container: test -d /home/vscode/.vscode-server [60804 ms] [60804 ms] [60804 ms] Exit code 1 [60805 ms] Start: Run in container: test -d /home/vscode/.vscode-remote [60806 ms] [60807 ms] [60807 ms] Exit code 1 [60807 ms] Start: Run in container: test ! -f '/home/vscode/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/vscode/.vscode-server/data/Machine' && { > '/home/vscode/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null [60814 ms] [60815 ms] [60816 ms] Start: Run: C:\Program Files\Microsoft VS Code\Code.exe c:\Users\jonmitch.vscode\extensions\ms-vscode-remote.remote-containers-0.238.3\dist\spec-node\devContainersSpecCLI.js read-configuration --workspace-folder c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug --log-level debug --log-format json --config c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug.devcontainer\devcontainer.json --include-features-configuration --mount-workspace-git-root true [61035 ms] remote-containers 0.238.3. [61035 ms] Start: Run: git rev-parse --show-cdup [61160 ms] Start: Run in container: mkdir -p '/home/vscode/.vscode-server/data/Machine' && cat >'/home/vscode/.vscode-server/data/Machine/settings.json' <<'settingsJSON' [61165 ms] [61166 ms] [61166 ms] Start: Run in container: test -d /home/vscode/.vscode-server/bin/30d9c6cd9483b2cc586687151bcbcd635f373630 [61168 ms] [61168 ms] [61168 ms] Exit code 1 [61169 ms] Start: Run in container: test -d /vscode/vscode-server/bin/linux-x64/30d9c6cd9483b2cc586687151bcbcd635f373630 [61171 ms] [61171 ms] [61171 ms] Start: Run in container: mkdir -p '/home/vscode/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/30d9c6cd9483b2cc586687151bcbcd635f373630' '/home/vscode/.vscode-server/bin/30d9c6cd9483b2cc586687151bcbcd635f373630' [61175 ms] [61175 ms] [61175 ms] Start: Run in container: touch '/vscode/vscode-server/bin/linux-x64/30d9c6cd9483b2cc586687151bcbcd635f373630' [61176 ms] Start: Launching Remote-Containers helper. [61176 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-34769431c731b13ae891ce8250d701df17d7d436.sock) forwarded to local host (\.\pipe\openssh-ssh-agent). [61176 ms] Start: Run: gpgconf --list-dir agent-extra-socket [61178 ms] [61178 ms] [61226 ms] findLocalWindowsExecutable: Exectuable 'gpgconf' not found on PATH 'C:\Python310\Scripts\;C:\Python310\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Python39\Scripts\;C:\Python39\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Python37\Scripts\;C:\Python37\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\jonmitch\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\Plantronics\Spokes3G\;C:\Python27;C:\Python27\Scripts;C:\Program Files\Java\jdk1.8.0_211\bin;C:\Program Files\Vorteil\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;%HOME%\AppData\Local\kubectl\kubectl.exe;C:\Program Files\Virgil_5.2.4;C:\Program Files\CMake\bin;C:\android_sdk\cmdline-tools\tools\bin;C:\android_sdk\platform-tools;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin\ngrok.exengrok.exe;C:\Program Files\Git LFS;C:\Program Files (x86)\Pulse Secure\VC142.CRT\X64\;C:\Program Files (x86)\Pulse Secure\VC142.CRT\X86\;C:\Program Files\Git\cmd;C:\Program Files\TortoiseSVN\bin;C:\Gradle\gradle-6.8.3\bin;C:\Users\jonmitch\Documents_CONFIG\vorteil\vorteil.exe;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI\;C:\Users\jonmitch\AppData\Local\kubectl\kubectl.exe;C:\ProgramData\chocolatey\bin\ngrok.exe;C:\Gradle\gradle-6.8.3\bin;C:\Users\jonmitch\Documents_CONFIG\vorteil\vorteil.exe;C:\Users\jonmitch\AppData\Local\nvs;C:\Users\jonmitch\AppData\Local.bvm;C:\Program Files (x86)\GitHub CLI\;C:\Program Files\OpenSSL-Win64\bin;C:\Users\jonmitch\AppData\Roaming\npm;C:\Users\jonmitch\AppData\Local\nvs;C:\Users\jonmitch\AppData\Local.bvm;C:\Program Files (x86)\GitHub CLI\;C:\Program Files\OpenSSL-Win64\bin;C:\Users\jonmitch\AppData\Roaming\npm;C:\Users\jonmitch\AppData\Local\nvs\default;c:\Users\jonmitch\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\cli-bin'. [61229 ms] Start: Run in container: /bin/sh [61230 ms] userEnvProbe: loginInteractiveShell (default) [61231 ms] userEnvProbe shell: /bin/bash [61231 ms] Start: Run in container: # Test for /home/vscode/.ssh/known_hosts and ssh [61234 ms] [61234 ms] [61234 ms] Start: Run in container: # Copy C:\Users\jonmitch.ssh\known_hosts to /home/vscode/.ssh/known_hosts [61237 ms] [61238 ms] [61238 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /home/vscode/.vscode-server/bin/30d9c6cd9483b2cc586687151bcbcd635f373630/node /tmp/vscode-remote-containers-34769431c731b13ae891ce8250d701df17d7d436.js $; }; f' || true [61241 ms] [61242 ms] [61242 ms] Start: Run in container: for pid in `cd /proc && ls -d [0-9]`; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr " [61287 ms] Start: Run in container: echo ~ [61289 ms] Start: Run in container: cat '/home/vscode/.vscode-server/data/Machine/.connection-token-30d9c6cd9483b2cc586687151bcbcd635f373630' 2>/dev/null || (umask 377 && echo 'a9a495f1-9ce8-454b-9c6c-60216defbd98' >'/home/vscode/.vscode-server/data/Machine/.connection-token-30d9c6cd9483b2cc586687151bcbcd635f373630-1d2672de-8f7d-4b4b-9327-d7880224ca16' && mv -n '/home/vscode/.vscode-server/data/Machine/.connection-token-30d9c6cd9483b2cc586687151bcbcd635f373630-1d2672de-8f7d-4b4b-9327-d7880224ca16' '/home/vscode/.vscode-server/data/Machine/.connection-token-30d9c6cd9483b2cc586687151bcbcd635f373630' && rm -f '/home/vscode/.vscode-server/data/Machine/.connection-token-30d9c6cd9483b2cc586687151bcbcd635f373630-1d2672de-8f7d-4b4b-9327-d7880224ca16' && cat '/home/vscode/.vscode-server/data/Machine/.connection-token-30d9c6cd9483b2cc586687151bcbcd635f373630') [61294 ms] a9a495f1-9ce8-454b-9c6c-60216defbd98 [61294 ms] [61295 ms] Start: Starting VS Code Server [61296 ms] Start: Preparing Extensions [61296 ms] Start: Run in container: test ! -f '/home/vscode/.vscode-server/data/Machine/.installExtensionsMarker' && set -o noclobber && mkdir -p '/home/vscode/.vscode-server/data/Machine' && { > '/home/vscode/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null [61300 ms] [61300 ms] [61302 ms] Extensions cache, install extensions: ms-azuretools.vscode-docker [61302 ms] Start: Run in container: test -d /home/vscode/.vscode-server/extensionsCache && ls /home/vscode/.vscode-server/extensionsCache || true [61304 ms] [61304 ms] [61305 ms] Start: Run in container: test -d /vscode/vscode-server/extensionsCache && ls /vscode/vscode-server/extensionsCache || true [61308 ms] bungcip.better-toml-0.3.2 christian-kohler.npm-intellisense-1.4.1 christian-kohler.npm-intellisense-1.4.2 christian-kohler.path-intellisense-2.8.0 christian-kohler.path-intellisense-2.8.1 dbaeumer.vscode-eslint-2.2.2 dbaeumer.vscode-eslint-2.2.6 esbenp.prettier-vscode-9.5.0 formulahendry.code-runner-0.11.8 github.vscode-pull-request-github-0.40.0 github.vscode-pull-request-github-0.42.0 github.vscode-pull-request-github-0.44.0 github.vscode-pull-request-github-0.46.0 gruntfuggly.todo-tree-0.0.215 johnpapa.vscode-peacock-4.0.1 knisterpeter.vscode-commitizen-1.1.0 mhutchie.git-graph-1.30.0 mikestead.dotenv-1.0.1 ms-azuretools.vscode-azureresourcegroups-0.5.4 ms-azuretools.vscode-azurestorage-0.14.1 ms-azuretools.vscode-azurestorage-0.14.2 ms-azuretools.vscode-docker-1.22.0 ms-kubernetes-tools.vscode-kubernetes-tools-1.3.10 ms-kubernetes-tools.vscode-kubernetes-tools-1.3.7 ms-kubernetes-tools.vscode-kubernetes-tools-1.3.9 ms-vscode.azure-account-0.10.1 ms-vscode.azure-account-0.11.0 mutantdino.resourcemonitor-1.0.7 nrwl.angular-console-17.16.0 nrwl.angular-console-17.18.7 rangav.vscode-thunder-client-1.16.2 rangav.vscode-thunder-client-1.16.3 rangav.vscode-thunder-client-1.16.4 rangav.vscode-thunder-client-1.16.5 rangav.vscode-thunder-client-1.16.6 redhat.java-1.8.0-linux-x64 redhat.vscode-xml-0.20.0 redhat.vscode-xml-0.21.0-linux-x64 redhat.vscode-yaml-1.7.0 redhat.vscode-yaml-1.8.0 sdras.vue-vscode-snippets-3.1.1 temitope1909.dotenv-intellisense-0.0.4 visualstudioexptteam.vscodeintellicode-1.2.22 vscjava.vscode-java-pack-0.22.4 vscjava.vscode-java-pack-0.23.0 vscjava.vscode-java-pack-0.24.0 vue.volar-0.34.11-linux-x64 vue.volar-0.38.3-linux-x64 wallabyjs.quokka-vscode-1.0.487 [61308 ms] [61309 ms] Extensions cache, link in container: ms-azuretools.vscode-docker-1.22.0 [61309 ms] Start: Run in container: mkdir -p '/home/vscode/.vscode-server/extensionsCache' && ln -s '/vscode/vscode-server/extensionsCache'/ '/home/vscode/.vscode-server/extensionsCache' || true [61320 ms] [61320 ms] [61321 ms] Start: Run in container: cd /vscode/vscode-server/extensionsCache && touch 'ms-azuretools.vscode-docker-1.22.0' [61321 ms] Start: Run in container: /home/vscode/.vscode-server/bin/30d9c6cd9483b2cc586687151bcbcd635f373630/bin/code-server --log debug --force-disable-user-env --server-data-dir /home/vscode/.vscode-server --use-host-proxy --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /home/vscode/.vscode-server/data/Machine/.connection-token-30d9c6cd9483b2cc586687151bcbcd635f373630 --extensions-download-dir /home/vscode/.vscode-server/extensionsCache --install-extension ms-azuretools.vscode-docker --start-server --disable-websocket-compression [61323 ms] [61324 ms] [61682 ms] /home/vscode [61683 ms] [61684 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-34769431c731b13ae891ce8250d701df17d7d436.js' >/tmp/vscode-remote-containers-34769431c731b13ae891ce8250d701df17d7d436.js [61700 ms] [61701 ms] [61702 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-34769431c731b13ae891ce8250d701df17d7d436.js' >/tmp/vscode-remote-containers-server-34769431c731b13ae891ce8250d701df17d7d436.js_1657238216999 [61720 ms] [61721 ms] [61874 ms]

[61880 ms] Start: Run in container: echo 44543 >'/home/vscode/.vscode-server/data/Machine/.devport-30d9c6cd9483b2cc586687151bcbcd635f373630' [61882 ms] [61882 ms] [61883 ms] Port forwarding for container port 44543 starts listening on local port. [61885 ms] Port forwarding local port 44543 to container port 44543 [61886 ms] Start: Run: C:\Program Files\Microsoft VS Code\Code.exe c:\Users\jonmitch.vscode\extensions\ms-vscode-remote.remote-containers-0.238.3\dist\spec-node\devContainersSpecCLI.js run-user-commands --user-data-folder c:\Users\jonmitch\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --workspace-folder c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug --container-id 794190ea87fd98bb27f2fb55dc3b81b489981c721253b3908c41e0e41c53ef08 --log-level debug --log-format json --config c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --skip-non-blocking-commands false --prebuild false --stop-for-personalization true --remote-env SSH_AUTH_SOCK=/tmp/vscode-ssh-auth-34769431c731b13ae891ce8250d701df17d7d436.sock --remote-env REMOTE_CONTAINERS_IPC=/tmp/vscode-remote-containers-ipc-34769431c731b13ae891ce8250d701df17d7d436.sock --remote-env REMOTE_CONTAINERS=true --mount-workspace-git-root true [61982 ms] userEnvProbe PATHs: Probe: '/home/vscode/.nvm/versions/node/v16.15.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin' Container: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' [61994 ms] Port forwarding connection from 56783 > 44543 > 44543 in the container. [61994 ms] Start: Run in container: /home/vscode/.vscode-server/bin/30d9c6cd9483b2cc586687151bcbcd635f373630/node -e [62102 ms] Installing extensions... [62105 ms] [23:56:57] Extension host agent started. [62156 ms] remote-containers 0.238.3. [62156 ms] Start: Run: docker buildx version [62384 ms] [23:56:57] ComputeTargetPlatform: linux-x64 [62715 ms] Installing extension 'ms-azuretools.vscode-docker'... [62762 ms] [23:56:58] ComputeTargetPlatform: linux-x64 [62764 ms] [23:56:58] Getting Manifest... ms-azuretools.vscode-docker [62827 ms] [23:56:58] Installing extension: ms-azuretools.vscode-docker [63076 ms] [23:56:58] Downloaded extension: ms-azuretools.vscode-docker /home/vscode/.vscode-server/extensionsCache/ms-azuretools.vscode-docker-1.22.0 [63243 ms] [23:56:58] Extracted extension to /home/vscode/.vscode-server/extensions/.bc029887-0ed3-4e14-9347-0868a419e94e: ms-azuretools.vscode-docker [63260 ms] [23:56:58] Renamed to /home/vscode/.vscode-server/extensions/ms-azuretools.vscode-docker-1.22.0 [63268 ms] [23:56:58] Extracting completed. ms-azuretools.vscode-docker [63269 ms] [23:56:58] Extension installed successfully: ms-azuretools.vscode-docker [63270 ms] Extension 'ms-azuretools.vscode-docker' v1.22.0 was successfully installed. [63536 ms] Port forwarding 56783 > 44543 > 44543 stderr: Connection established [63552 ms] Port forwarding connection from 56791 > 44543 > 44543 in the container. [63552 ms] Start: Run in container: /home/vscode/.vscode-server/bin/30d9c6cd9483b2cc586687151bcbcd635f373630/node -e [63558 ms] [23:56:58] [127.0.0.1][f28b8200][ManagementConnection] New connection established. [63570 ms] Start: Run: git rev-parse --show-cdup [63752 ms] Start: Run: docker inspect --type container 794190ea87fd98bb27f2fb55dc3b81b489981c721253b3908c41e0e41c53ef08 [64123 ms] Start: Inspecting container [64124 ms] Start: Run: docker inspect --type container 794190ea87fd98bb27f2fb55dc3b81b489981c721253b3908c41e0e41c53ef08 [64126 ms] Port forwarding 56791 > 44543 > 44543 stderr: Connection established [64273 ms] [23:56:59] [127.0.0.1][7be09056][ExtensionHostConnection] New connection established. [64289 ms] [23:56:59] [127.0.0.1][7be09056][ExtensionHostConnection] <604> Launched Extension Host Process. [64466 ms] Start: Run in container: /bin/sh [64526 ms] Start: Run in container: uname -m [64588 ms] Port forwarding connection from 56795 > 44543 > 44543 in the container. [64588 ms] Start: Run in container: /home/vscode/.vscode-server/bin/30d9c6cd9483b2cc586687151bcbcd635f373630/node -e [64990 ms] x86_64 [64990 ms] [64990 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null [64996 ms] PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" [64996 ms] [64996 ms] Start: Run in container: cat /etc/passwd [65001 ms] userEnvProbe: loginInteractiveShell (default) [65002 ms] Start: Run in container: mkdir -p '/home/vscode/.devcontainer' && CONTENT="$(cat '/home/vscode/.devcontainer/.onCreateCommandMarker' 2>/dev/null || echo ENOENT)" && [ "${CONTENT:-2022-07-07T23:56:52.8555706Z}" != '2022-07-07T23:56:52.8555706Z' ] && echo '2022-07-07T23:56:52.8555706Z' > '/home/vscode/.devcontainer/.onCreateCommandMarker' [65002 ms] userEnvProbe shell: /bin/bash [65003 ms] Start: Run in container: /bin/bash -lic echo -n 8e8e3922f190c13e673694ca4ff7ad47; cat /proc/self/environ; echo -n 8e8e3922f190c13e673694ca4ff7ad47 [65009 ms] [65009 ms] [65009 ms] Start: Run in container: mkdir -p '/home/vscode/.devcontainer' && CONTENT="$(cat '/home/vscode/.devcontainer/.updateContentCommandMarker' 2>/dev/null || echo ENOENT)" && [ "${CONTENT:-2022-07-07T23:56:52.8555706Z}" != '2022-07-07T23:56:52.8555706Z' ] && echo '2022-07-07T23:56:52.8555706Z' > '/home/vscode/.devcontainer/.updateContentCommandMarker' [65017 ms] [65017 ms] [65017 ms] Start: Run in container: mkdir -p '/home/vscode/.devcontainer' && CONTENT="$(cat '/home/vscode/.devcontainer/.postCreateCommandMarker' 2>/dev/null || echo ENOENT)" && [ "${CONTENT:-2022-07-07T23:56:52.8555706Z}" != '2022-07-07T23:56:52.8555706Z' ] && echo '2022-07-07T23:56:52.8555706Z' > '/home/vscode/.devcontainer/.postCreateCommandMarker' [65022 ms] [65022 ms] Running the postCreateCommand from devcontainer.json...

[65234 ms] Port forwarding 56795 > 44543 > 44543 stderr: Connection established [65892 ms] userEnvProbe PATHs: Probe: '/home/vscode/.nvm/versions/node/v16.15.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin' Container: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' [65893 ms] Start: Run in container: /bin/sh -c sudo chown $(whoami) node_modules /bin/sh: 1: whoami: not found /bin/sh: 1: sudo: not found [66613 ms] postCreateCommand failed with exit code 127. Skipping any further user-provided commands. [67090 ms] Error: Command failed: /bin/sh -c sudo chown $(whoami) node_modules [67090 ms] at bc (c:\Users\jonmitch.vscode\extensions\ms-vscode-remote.remote-containers-0.238.3\dist\spec-node\devContainersSpecCLI.js:100:137) [67091 ms] at processTicksAndRejections (node:internal/process/taskqueues:96:5) [67091 ms] at async yc (c:\Users\jonmitch.vscode\extensions\ms-vscode-remote.remote-containers-0.238.3\dist\spec-node\devContainersSpecCLI.js:93:3564) [67091 ms] at async wc (c:\Users\jonmitch.vscode\extensions\ms-vscode-remote.remote-containers-0.238.3\dist\spec-node\devContainersSpecCLI.js:93:2839) [67091 ms] at async i (c:\Users\jonmitch.vscode\extensions\ms-vscode-remote.remote-containers-0.238.3\dist\spec-node\devContainersSpecCLI.js:245:22496) [67092 ms] at async n_ (c:\Users\jonmitch.vscode\extensions\ms-vscode-remote.remote-containers-0.238.3\dist\spec-node\devContainersSpecCLI.js:245:20650) [67106 ms] Exit code 1 [67106 ms] Command failed: C:\Program Files\Microsoft VS Code\Code.exe c:\Users\jonmitch.vscode\extensions\ms-vscode-remote.remote-containers-0.238.3\dist\spec-node\devContainersSpecCLI.js run-user-commands --user-data-folder c:\Users\jonmitch\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --workspace-folder c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug --container-id 794190ea87fd98bb27f2fb55dc3b81b489981c721253b3908c41e0e41c53ef08 --log-level debug --log-format json --config c:\Users\jonmitch\Documents_LOCAL_DEV\MAGNOLIA_CMS\devcontainer-bug.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --skip-non-blocking-commands false --prebuild false --stop-for-personalization true --remote-env SSH_AUTH_SOCK=/tmp/vscode-ssh-auth-34769431c731b13ae891ce8250d701df17d7d436.sock --remote-env REMOTE_CONTAINERS_IPC=/tmp/vscode-remote-containers-ipc-34769431c731b13ae891ce8250d701df17d7d436.sock --remote-env REMOTE_CONTAINERS=true --mount-workspace-git-root true [67283 ms] Start: Run in container: cat /proc/850/environ [72926 ms] Port forwarding 56795 > 44543 > 44543 stderr: Remote close [72957 ms] Port forwarding 56795 > 44543 > 44543 terminated with code 0 and signal null. [141316 ms] Port forwarding connection from 56881 > 44543 > 44543 in the container. [141318 ms] Start: Run in container: /home/vscode/.vscode-server/bin/30d9c6cd9483b2cc586687151bcbcd635f373630/node -e [141564 ms] Port forwarding connection from 56886 > 44543 > 44543 in the container. [141564 ms] Start: Run in container: /home/vscode/.vscode-server/bin/30d9c6cd9483b2cc586687151bcbcd635f373630/node -e [141827 ms] Port forwarding 56881 > 44543 > 44543 stderr: Connection established [141842 ms] Port forwarding 56881 > 44543 > 44543: Local close [141850 ms] Port forwarding 56881 > 44543 > 44543 stderr: Remote stdin close [141880 ms] Port forwarding 56881 > 44543 > 44543 terminated by extension (closed) with code 0 and signal null. [142029 ms] Port forwarding 56886 > 44543 > 44543 stderr: Connection established [192956 ms] Port forwarding 56795 > 44543 > 44543: Local close with error [203708 ms] Port forwarding 56886 > 44543 > 44543: Local close [203720 ms] Port forwarding 56886 > 44543 > 44543 stderr: Remote stdin close [203756 ms] Port forwarding 56886 > 44543 > 44543 terminated by extension (closed) with code 0 and signal null.



Steps to Reproduce:

REPO: [Devcontainer-bug](https://github.com/ontoneio/devcontainer-path-bug-repro)

1. From VsCode Command Pallete RUN `Remote-Containers: Rebuild without Cache and Reopen in container` 
2. Notice upon finishing that the `"postCreateCommand": "sudo chown $(whoami) node_modules",` in `devcontainer.json` doesn't break
3. Notice upon finishing that the `"postStartCommand": "npm install",` in `devcontainer.json` doesn't break
4. From VsCode Command Pallete RUN `Remote-Containers: Reopen Folder Locally`
5. Uncomment either `"PATH"` variable under the `remoteEnv` property in the `devcontainer.json`
6. From VsCode Command Pallete RUN `Remote-Containers: Rebuild without Cache and Reopen in container` 
7. Notice upon finishing that the `"postCreateCommand": "sudo chown $(whoami) node_modules",` in `devcontainer.json` breaks
8. Notice upon finishing that the `"postStartCommand": "npm install",` in `devcontainer.json` breaks

Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No
ontoneio commented 2 years ago

I am not completely confident this is a bug, but I followed instructions from This Tutorial Video and it did not work.

Open to the possibility that I just might not understand how to configure properly.

chrmarti commented 2 years ago

Your repository has ${containerEnv:$PATH} which uses an extra $. Does it work with ${containerEnv:PATH}?

ontoneio commented 2 years ago

@chrmarti Thanks for the quick response! That seemed to be it with regard to this. Closing the issue.

Thanks for your help again. Hate when those little things get away from me.