You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PATH environment variable overwritten in version 4.0.1 using Docker image #4699
The problem can be reproduced by building the following minimal Docker image :
FROM codercom/code-server:4.0.1
ENV PATH="/home/coder/local/bin/conda/bin:${PATH}"
RUN echo $PATH
and running it as a local server in the browser as explained in the installation guide.
Expected
When opening a terminal in VSCode, the value of $PATH should be the same as the one echoed at the end of the docker build step. The behavior is correct when building the image from code-server:3.12.0.
Actual
When building from code-server:4.0.1, the $PATH variable gets overwritten with the following path /usr/lib/code-server/vendor/modules/code-oss-dev/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games. If I run an interactive shell in the docker image using docker exec, the $PATH is as expected. But when opening VSCode in the browser, it is incorrect. I don't see any command in the entrypoint.sh script which modifies this variable.
Activity
jsjoeio commentedon Jan 7, 2022
@code-asher any ideas what might have been introduced that would modify the
$PATH? 🤔code-asher commentedon Jan 10, 2022
rafipiccolo commentedon Feb 22, 2022
i have configured git hooks. if i can't set the PATH correctly my hooks dont work and i cant use vscode git gui.
i tried to set the PATH system wide
checked it works with
its ok. it prints the desired version of the path
but i see no changes in vscode terminal.
even if i had added this to settings.json
and my git hooks still doent work :(
anybody has a workarround ?
EDIT:
Its a fat shame, but i ended creating symbolic links to my binaries in /bin
at least now my hooks work.
avouacr commentedon Feb 24, 2022
@rafipiccolo
our workaround for the time being :
which sets the correct
$PATHprovided$SHELLis set to/bin/bash, which it is by default.code-asher commentedon Oct 5, 2022
We started discussing the cause in a duplicate issue #5621 so I am going to close this one as there is now more information in #5621.