microsoft / microsoft/vscode-remote-release

Allow for disabling automatic forwarding of sockets from the host when attaching to a container

Open
#8,031 3 comments 16 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Feb 20, 2023.

containers feature-request
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

When attaching to a running container, vscode tries to forward it's own sockets (eg for ssh, x11 etc). But if the container already forwards these sockets and has it's own config this create a conflict / incorrect configuration.

I was confused why apps suddenly stopped being displayed in my container, turns out that vscode overwrites my DISPLAY=:0 and sets it to DISPLAY=:7, creates a separate sockets, and results in a window not appearing on the screen and the application hanging :-/

Could there be an environment variable or something that can be set in the running container to indicate to vscode that I don't want it to automatically forward ssh/x11/etc as I have already handled the forwarding ? As it is incredibly annoying to have created a working development environment to then have it broken by extension updates that decide to overwrite existing env variables (and hard to debug).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.