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

Docker not being executed in windows when a \\wsl$\ folder is opened #7080

Open
KallDrexx opened this issue Aug 17, 2022 · 1 comment
Open
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality
Milestone

Comments

@KallDrexx
Copy link

  • VSCode Version: 1.70.1
  • Local OS Version: Windows 11 21H2 22000.856
  • Remote OS Version: N/A
  • Remote Extension/Connection Type: SSH/Containers/WSL/Server: Container
  • Logs:
    container logs.txt

Steps to Reproduce:

  1. Open docker desktop -> settings -> Resources -> WSL Integration
  2. Deselect Enable integration with my default WSL distro
  3. Deselect all "additional" distros and save (make sure it persists)
  4. In WSL verify the docker command doesn't work
  5. In VScode go into the settings json and set remote.containers.executeInWSL to false
  6. Open a folder in a WSL path (e.g. \wsl$\Ubuntu\home<user><code-dir>)
  7. Reopen in container
    ---> Observe error that docker is not installed

If you open a folder in a native windows path (e.g. C:\Users\user\code-dir) this does not occur and it opens in the container successfully.

Does this issue occur when you try this locally?: N/A
Does this issue occur when you try this locally and all extensions are disabled?: N/A


It appears that if you open a folder in a WSL path, the remote extensions forces the docker commands to run from within the default WSL2 installation and not on the windows host.

Our team tends to have code hosted within the WSL file system as we've noticed significant improved build and intellisense times than when on the windows partition.

Running docker from windows instead of from WSL is important because our project requires host networking, and host networking does not work if Windows docker desktop is executed via a docker run execution inside of WSL, but does work when executed from within windows powershell. By "does not work" I mean zero networked services created by the container are reachable from windows or WSL.

I cannot find any way to force this plugin to use windows docker command instead of WSL's docker command.

@tanhakabir tanhakabir added the containers Issue in vscode-remote containers label Aug 17, 2022
@chrmarti chrmarti added the feature-request Request for new features or functionality label Sep 6, 2022
@chrmarti chrmarti added this to the Backlog milestone Sep 6, 2022
@chrmarti
Copy link
Contributor

chrmarti commented Sep 6, 2022

We could change the existing setting to support 'Never', 'For WSL paths (default)', 'Always'.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants