Skip to content

[Bug]: code-server (run with docker) will always overwrite PATH variable #5621

Description

@huweiATgithub

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Remote OS: Ubunu
  • Remote Architecture: amd64
  • code-server --version: both v4.7.0 and v4.0.1 are tried

Steps to Reproduce

  1. In a machine with docker installed, run
    mkdir -p ~/.config
    docker run -it --name code-server -p 127.0.0.1:8080:8080 \
    -v "$HOME/.config:/home/coder/.config" \
    -v "$PWD:/home/coder/project" \
    -u "$(id -u):$(id -g)" \
    -e "DOCKER_USER=$USER"  -e "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/some/path" \
    codercom/code-server:latest
  2. Login to the browser, launch terminal in vscode and print the PATH echo $PATH
  3. Always get:

Expected

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/some/path with some extra paths appended by code-server.

Actual

/usr/lib/code-server/lib/vscode/bin/remote-cli:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

Though I checked I am using HTTPS, but I actually running locally without HTTPS.
I checked it because it is a must and I think HTTPS has nothing to do with the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThis issue needs to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions