Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev Containers (version 0.275.x) corrupts existing X forwarding in docker container #8011

Closed
johan-laneau opened this issue Feb 9, 2023 · 2 comments
Labels
containers Issue in vscode-remote containers

Comments

@johan-laneau
Copy link

johan-laneau commented Feb 9, 2023

  • VSCode Version: January 2023
  • Local OS Version: Windows 10 22H2
  • Remote OS Version: Ubuntu 20.04
  • Remote Extension/Connection Type: Containers

Steps to Reproduce:

  1. Create a docker container with a socket mounted to forward X communication from e.g. WSL to the docker container. I do this via docker-compose.yml file with following lines
    '''volumes:
    • source: /tmp/.X11-unix
      target: /tmp/.X11-unix
      type: bind
      '''
  2. Then create devcontainer.json for the docker-compose.yml and launch VS Code January 2023 edition.
  3. The X forwarding in the docker container does not work anymore.

The issue started occurring since Dev Containers (version 0.275.x) that was installed together with VS Code January 2023 version. I assume it is caused by the X11 & Wayland Forwarding that was introduced in this version.
I think the extension should detect that the docker container already has X forwarding and then not try to insert its own forwarding.

My current work-around is the locally remove the X forwarding from the docker-compose.yml file. Then, the docker container will use the docker forwarding inserted by the dev container extension. However, this workaround is not good because I can't use the same docker-compose.yml file for other usecases where VS Code is not used and X forwarding is still required.

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Feb 9, 2023
@ahayzen
Copy link

ahayzen commented Feb 12, 2023

Note i've started a feature request to prevent all automatic forwarding of sockets #8031 so that this doesn't silently fail again and allow for opting out of forwarding.

I also think that if forwarding is enabled it should not set the env var if it is already set in a container that is being attached to (or at least warn that it is overwriting).

@chrmarti
Copy link
Contributor

Tracking as #7983.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers
Projects
None yet
Development

No branches or pull requests

3 participants