microsoft / microsoft/vscode-remote-release
Docker not being executed in windows when a \\wsl$\ folder is opened
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
- 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:
- Open docker desktop -> settings -> Resources -> WSL Integration
- Deselect
Enable integration with my default WSL distro - Deselect all "additional" distros and save (make sure it persists)
- In WSL verify the docker command doesn't work
- In VScode go into the settings json and set
remote.containers.executeInWSLtofalse - Open a folder in a WSL path (e.g. \wsl$\Ubuntu\home<user><code-dir>)
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using a folder under \wsl$ and the remote.containers.executeInWSL setting, comparing it with a native Windows path. Review the attached container logs and the code path that invokes docker; done means reopening the WSL-hosted folder uses the Windows Docker command successfully when WSL execution is disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- devops, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100