Dev Containers invokves wsl commands despite DOCKER_HOST and no Remote - WSL Extension
I am trying to run a dev container with podman. No matter what I do, vscode always starts a WSL instance to run podman rather than using podman on Windows (yes, I know podman runs in a WSL instance but vscode starts runs it in a completely different instance). I have tried everything I and my friendly LLM can think of to troubleshoot this.
- VSCode Version: 1.100.3
- Local OS Version: Windows 11 Enterprise 10.0.22631 Build 22631
- Remote OS Version: Podman desktop v1.19.1
- Remote Extension/Connection Type: Dev Containers 0.413.0
- Logs:
- remoteContainers-2025-06-12T03-48-29.684Z.log
- Here is the start of the dev containers log that shows it starting WSL
[71 ms] Dev Containers 0.413.0 in VS Code 1.100.3 (258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3).
[70 ms] Start: Resolving Remote
[120 ms] Setting up container for folder or workspace: c:\Users\kgray\Software\sas-applications
[120 ms] Host: npipe:////./pipe/docker_engine
[179 ms] Start: Run: wsl -l -v
[455 ms] Start: Run: wsl -d AlmaLinux9 -e /bin/sh -c echo ~
[990 ms] Start: Run: wsl -d AlmaLinux9 -e /bin/sh -c cd '/home/keith' && /bin/sh
Steps to Reproduce:
- Install podman desktop on Windows 11
- Install vscode with the dev containers plugin
- Change the Dev > Containers: Docker Path to be
podman - Change the Dev > Containers: Docker Socket Path to be
npipe:////./pipe/docker_engine - Set the DOCKER_HOST environment variable in windows to be
npipe:////./pipe/docker_engine - Install the docker cli with
winget install --id Docker.DockerCLI - Dev > Containers: Execute in WSL is unchecked
- Dev > Containers: Execute in WSLDistro is blank
- terminal.integrated.env.windows = {"DOCKER_HOST": "npipe:////./pipe/docker_engine"}
- containers.containerClient = "com.microsoft.visualstudio.containers.podman"
- In a powershell prompt inside of vscode,
docker context lsproduces ``` NAME DESCRIPTION DOCKER ENDPOINT ERROR default * Current DOCKER_HOST based configuration npipe:////./pipe/docker_engine
Warning: DOCKER_HOST environment variable overrides the active context. To use a context, either set the global --context flag, or unset DOCKER_HOST environment variable.
<!-- Check to see if the problem is general, with a specific extension, or only happens when remote -->
Does this issue occur when you try this locally?: NA
Does this issue occur when you try this locally and all extensions are disabled?: NA
<!-- If your issue only appears in Codespaces, please visit: https://github.com/github/feedback/discussions/categories/codespaces-feedback -->
Please let me know if I can provide any more information.
Thank you in advance.
Try disabling:
Try disabling:
![]()
Thank you for the suggestion. I just tested it and get the same result, vscode starts working in WSL.
Could you try also disabling the WSL service forwarding:
I think both settings need to be disabled to completely prevent the use of WSL.
@chrmarti Thank you sooo much, this finally did it. This issue can be closed. Thank you both.
[53 ms] Dev Containers 0.417.0 in VS Code 1.101.0 (dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1).
[53 ms] Start: Resolving Remote
[92 ms] Setting up container for folder or workspace: c:\Users\kgray\Software\sas-applications
[92 ms] Host: npipe:////./pipe/docker_engine
[138 ms] Start: Check Docker is running
[138 ms] Start: Run: podman version
[822 ms] Client: Podman Engine
Version: 5.5.0
API Version: 5.5.0
Go Version: go1.24.2
Git Commit: 0dbcb51477ee7ab8d3b47d30facf71fc38bb0c98
Built: Wed May 14 10:44:25 2025
OS/Arch: windows/amd64
Server: Podman Engine
Version: 5.5.0
API Version: 5.5.0
Go Version: go1.23.8
Git Commit: 0dbcb51477ee7ab8d3b47d30facf71fc38bb0c98
Built: Tue May 13 19:00:00 2025
OS/Arch: linux/amd64
Great, thanks!