Repository navigation
Dev container with the wslc runtime hangs when the repo is on the WSL filesystem (works from Windows) #11750
Description
- VSCode Version: 1.128.1
- Local OS Version: Windows 11 10.0.26200 (25H2)
- Remote OS Version: WSL2 distro (kernel 6.18.35.2-microsoft-standard-WSL2); container image
mcr.microsoft.com/devcontainers/base:ubuntu - Remote Extension/Connection Type: Dev Containers
- Dev Containers extension: v0.465.0
@devcontainers/cli: 0.88.0- wslc: 2.9.4.0
Summary
Building/reopening a dev container using the wslc container runtime fails during container setup when the project folder lives on the WSL filesystem and VS Code is attached to or opened from WSL. The same dev container succeeds when the project folder is on the Windows filesystem (e.g. D:\...).
Minimal dev container to reproduce
.devcontainer/devcontainer.json:
{
"name": "wslc-repro",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/git:1": {}
},
"postCreateCommand": "echo 'postCreateCommand ran' && git --version && uname -a && cat /etc/os-release && whoami && pwd",
"remoteUser": "vscode"
}(No Dockerfile — a prebuilt image plus a single Feature is enough.)
Steps to Reproduce
Prerequisite: wslc runtime installed and selected as the Dev Containers Docker path.
A. From Windows (works):
- Put the folder above on the Windows filesystem, e.g.
D:\wslc-repro. - Open it in VS Code → Dev Containers: Reopen in Container.
- The image pulls, the Feature installs, the container starts, and
postCreateCommandoutput appears.
B. From WSL (fails):
- Put the same folder inside a WSL distro on the Linux filesystem, e.g.
/home/<user>/wslc-repro(\\wsl.localhost\<distro>\home\<user>\wslc-repro). - Open it in VS Code → Dev Containers: Reopen in Container.
- Container setup does not complete.
What happens (observed in VS Code)
VS Code hangs. The "Setting up container" progress never completes and the container never opens. The Dev Containers setup log in the terminal freezes partway through and no error is shown — the last line printed is the Feature-content image build, after which there is no further output:
[8834 ms] * Fetched feature: git_0_oci version 1.3.8
[8841 ms] Start: Run: wslc.exe build -t dev_container_feature_content_temp -f /tmp/devcontainercli-<user>/container-features/<id>/Dockerfile.buildContent /tmp/devcontainercli-<user>/container-features/<id>
From the UI there is no indication of what failed; it simply appears stuck.
How the underlying error was found
Because VS Code surfaced no error, I re-ran the same Dev Containers CLI up command that VS Code invokes (it is printed earlier in the setup log) manually inside the WSL distro, adding --log-level debug. Run directly, the command does not hang — it errors out at a later step than where the VS Code terminal froze: the remote-user UID/GID build step.
Start: Run: wslc.exe build -f /tmp/devcontainercli-<user>/updateUID.Dockerfile-0.88.0 -t vsc-wslc-repro-<hash>-features-uid --platform linux/amd64 --build-arg BASE_IMAGE=vsc-wslc-repro-<hash>-features --build-arg REMOTE_USER=vscode --build-arg NEW_UID=1000 --build-arg NEW_GID=1000 --build-arg IMAGE_USER=root /tmp/devcontainercli-<user>/empty-folder
Error: Command failed: wslc.exe build -f /tmp/devcontainercli-<user>/updateUID.Dockerfile-0.88.0 -t vsc-wslc-repro-<hash>-features-uid --platform linux/amd64 ...
{"outcome":"error","message":"Command failed: wslc.exe build ... --platform linux/amd64 ...","description":"An error occurred setting up the container."}
Running just that wslc build invocation on its own reports:
Argument name was not recognized for the current command: '--platform'
Note: this error text does not appear anywhere in the VS Code terminal during the failing "Reopen in Container" — it was only visible by re-running the CLI command manually.
Activity
MikeEvansLarah commentedon Jul 16, 2026
I found this same issue. It does appear to be multiple problems.
Firstly, enabling any features causes a hang here:
Running that same
wslc buildcommand in a WSL terminal succeeds for me though.Secondly, it seems the dev container CLI was updated in this PR devcontainers/cli#1249 to add WSLC support, but the
updateRemoteUserUIDfunction still forces the--platformargument, whichwslcdoesn't support.I did get a bit further by disabling all features, and setting
updateRemoteUserUIDto false:{ "name": "wslc-repro", "image": "mcr.microsoft.com/devcontainers/base:ubuntu", // "features": { // "ghcr.io/devcontainers/features/git:1": {} // }, "postCreateCommand": "echo 'postCreateCommand ran' && git --version && uname -a && cat /etc/os-release && whoami && pwd", "remoteUser": "vscode", "updateRemoteUserUID": false }But then it gets stuck waiting. I see Windows-style file paths (
-l devcontainer.local_folder=\\wsl.localhost\Ubuntu\home\mike\repos\wslc-test) in thewslc runandwslc pscommands which doesn't seem rightcraigloewen-msft commentedon Jul 17, 2026
Unfortunately right now
wslc.exeis not supported inside of a WSL distro. You can runwslc.exebut bind mounting will be very difficult (This is because they run in separate VMs!)I created an issue to track this feature request here at the WSL repo: microsoft/WSL#41105
vs-code-engineering commentedon Oct 6, 2026
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
rene-deltares commentedon Oct 11, 2026
I would love for wslc to be able to bind-mount a folder from a WSL directory. Or even to checkout a repository in a volume and just mount that into the container instead.
Installing Docker from within a WSL distribution, or Docker Desktop in Windows is currently the biggest hurdle for my teammates to start developing in dev containers. I would love it if they could just use WSL directly. But bind-mounting a Windows project folder into a linux container has some problems:
DockerfileI use for our devcontainer failed to build withwslcbecause of it (I know this can be worked around, but to illustrate the problem)..vscode/settings (in .gitignore just to respect people's personal preferences) that they likely already have in their folder usually have Windows paths, which may have backslashes, drive letters or rely on case insensitivity.