On this page
WSL 3.0 made WSL containers generally available on 29 September. The feature adds a command, wslc, that builds and runs Linux containers on Windows with no Docker Desktop installed, and Microsoft ships it as part of WSL. For teams that have been paying for Docker Desktop seats since the 2021 licensing change, the obvious question is whether a developer laptop can now do without it.
I ran the work a developer does in a day through wslc on one Windows 11 laptop: build a .NET 10 image and a Python image, run them, read and write files on every kind of storage, publish a port, connect a VPN, open a dev container in VS Code, and try the Docker commands people type from habit. For file I/O and networking I ran the same steps through Docker Desktop on the same machine.
The short version. Building and running images works, with the commands you already know. Volumes are fast. A Windows folder mounted into a container is slow, about a hundred times slower than a volume for small files, and Docker Desktop was slower still on this laptop. Networking worked through the VPN without any change. A published port answers on localhost only. There is no Compose, and that decides the question for many teams today.

Test Environment
Everything ran on one machine. The lab is a PowerShell script that times each step, records the exit code and writes a results file; the same script runs each step with Docker when a Docker engine answers.
| Item | Value |
|---|---|
| Laptop | 12th generation Intel Core i7 (U series, 12 logical processors), 32 GB RAM |
| Windows | Windows 11 Pro, Insider Preview |
| WSL | 3.0, updated with wsl --update |
| Images built | .NET 10 minimal API (multi-stage, non-root); Python 3.14 HTTP service on python:3.14-slim (non-root) |
| File workload | 5,000 small files written, listed and read; then one 512 MiB file written with fsync and read back; inside debian:stable-slim |
| Comparison | Docker Desktop on the same laptop, for file I/O and networking only |
| VPN | NordVPN, one server |
Architecture Overview
It helps to know what wslc starts before reading the numbers. Microsoft describes the design in its architecture post. The command talks to wslservice.exe, the privileged WSL service, which creates a virtual machine through the Host Compute Service. The service then hands the machine to a child process, wslcsession.exe, which runs as the signed-in user and does the session work: creating containers, mounting folders and binding ports. Each session keeps its images, containers and volumes in its own virtual disk under %LocalAppData%\wslc\sessions.
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#FFF3E0','primaryTextColor':'#232F3E','primaryBorderColor':'#FF9900','lineColor':'#232F3E','clusterBkg':'#F8FAFC','clusterBorder':'#CBD5E1','edgeLabelBackground':'#FFFFFF','nodeTextColor':'#232F3E'}}}%%
flowchart TD
A["wslc.exe or container.exe<br />run by the developer"] --> B["wslservice.exe<br />privileged Windows service"]
B --> C["wslcsession.exe<br />one per session, runs as the user"]
C --> D["Linux virtual machine<br />containers run here"]
D --> E["Session virtual disk<br />images, containers, volumes"]
D --> F["virtiofs share<br />a Windows folder mounted in"]
D --> G["Consomme network relay on Windows<br />DNS, TCP and UDP, port mapping"]
classDef compute fill:#FFF3E0,stroke:#FF9900,stroke-width:2px,color:#232F3E
classDef db fill:#EBF8FF,stroke:#0073BB,stroke-width:2px,color:#004C74
classDef store fill:#F0FFF4,stroke:#1D8102,stroke-width:2px,color:#145202
classDef alert fill:#FEF2F2,stroke:#D13212,stroke-width:2px,color:#991B1B
classDef mesh fill:#F3E8FF,stroke:#7C3AED,stroke-width:2px,color:#4C1D95
class A,C compute
class B mesh
class D db
class E,F store
class G mesh
Three parts of this design show up in the measurements. A named volume or a VHD volume lives on a Linux file system inside the virtual machine. A Windows folder passed with -v C:\path:/data is shared into the machine with virtiofs, which Microsoft says is about twice as fast as the plan9 share WSL used before. Network traffic leaves the machine as Ethernet frames that a Windows process, running as the user, turns into ordinary Windows sockets. Microsoft calls that model Consommé.
Microsoft does not name the container engine inside the virtual machine. The build output and the pull output have the same format as Docker with BuildKit, and wslc network ls lists the same three default networks (bridge, host, none), so existing Dockerfiles and habits carry over.
Image Builds
Both images are built from a Containerfile, passed with -f. A file named Dockerfile works the same way. This is the .NET one, a standard multi-stage build that ends in a non-root runtime image:
# Multi-stage build: SDK image to publish, ASP.NET runtime image to run, non-root user.
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY app.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o /out --no-restore
FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
COPY --from=build /out .
ENV ASPNETCORE_HTTP_PORTS=8080
EXPOSE 8080
USER $APP_UID
ENTRYPOINT ["dotnet", "app.dll"]wslc build -t wslclab-dotnet -f .\apps\dotnet\Containerfile .\apps\dotnet
wslc run -d --rm -p 18081:8080 --name wslclab-dotnet wslclab-dotnet
wslc exec wslclab-dotnet uname -sr
wslc container logs wslclab-dotnet
wslc container stop wslclab-dotnet| Step | .NET 10 image | Python 3.14 image |
|---|---|---|
| First build, base images not yet pulled | 68.8 s | 13.2 s |
| Second build, nothing changed | 0.9 s | 1.0 s |
| Image size | 237 MB | 120 MB |
wslc run -d returns | 0.9 s | 0.7 s |
First HTTP 200 from Windows on localhost | 2.7 s | 2.2 s |
exec / logs / stop | 0.3 s / 0.2 s / 0.7 s | 0.3 s / 0.2 s / 0.7 s |
The first build is mostly download time for the SDK and runtime images, so it says more about the connection than about wslc. The second build shows that the layer cache works: under a second with no changes. The time to the first HTTP response includes the application starting and a polling client, so read it as an upper bound. None of these figures would make a developer notice a difference from Docker.
File I/O by Storage Type
Storage is where the choice of where files live changes the result by two orders of magnitude. The benchmark runs inside the container, so each storage type does identical work. These are the figures for wslc alone, with Docker Desktop not running, as a range over the rounds:
| Storage | 5,000 files: write | list | read | 512 MiB: write | read |
|---|---|---|---|---|---|
| Container file system | 0.35 to 0.36 s | 0.03 to 0.04 s | 0.24 to 0.25 s | 1.06 to 1.14 s | 0.11 to 0.23 s |
| Named volume | 0.31 to 0.36 s | 0.03 to 0.06 s | 0.16 to 0.34 s | 1.01 to 1.42 s | 0.14 to 0.21 s |
| VHD volume (4 GiB) | 0.34 to 0.55 s | 0.03 to 0.07 s | 0.19 to 0.25 s | 0.70 to 1.18 s | 0.11 to 0.17 s |
| Windows folder mounted in | 36.7 to 40.6 s | 22.3 to 23.3 s | 30.7 to 33.2 s | 2.97 to 3.27 s | 1.99 to 2.28 s |
The first three rows are the same within noise. The Windows folder is a different class: about 8 milliseconds to create and write each small file, and 4.6 milliseconds per file for ls -l, which is one metadata call per file crossing from Linux to Windows. The large file fares better, at about 170 MiB per second against about 470 on a volume, because one big file is few calls and many bytes.
A VHD volume is created with a size and shows up in the container as an ext4 device, which is useful when a container must not fill the disk:
wslc volume create --driver vhd -o SizeBytes=4294967296 wslclab-vhd
wslc run --rm -v wslclab-vhd:/data debian:stable-slim df -h /dataI then ran the workload again with Docker Desktop running as well, so both engines had their virtual machine up. Three rounds each:
| Storage | Engine | 5,000 files: write | list | read | 512 MiB: write |
|---|---|---|---|---|---|
| Container file system | wslc | 0.29 to 0.57 s | 0.03 to 0.05 s | 0.12 to 0.23 s | 0.92 to 1.26 s |
| Container file system | Docker Desktop | 0.36 to 0.47 s | 0.03 to 0.04 s | 0.15 to 0.25 s | 0.79 to 0.89 s |
| Named volume | wslc | 0.26 to 0.30 s | 0.03 s | 0.13 to 0.30 s | 0.55 to 1.01 s |
| Named volume | Docker Desktop | 0.13 to 0.15 s | 0.01 s | 0.06 to 0.07 s | 0.17 to 0.36 s |
| Windows folder mounted in | wslc | 43.2 to 46.1 s | 34.5 to 35.4 s | 41.6 to 44.2 s | 2.83 to 3.09 s |
| Windows folder mounted in | Docker Desktop | 49.6 to 78.1 s | 36.2 to 73.7 s | 32.5 to 62.7 s | 5.9 to 15.7 s |
Two things stand out. On a named volume Docker Desktop was about twice as fast as wslc, although both finish 5,000 files in well under a second, so few workloads will feel it. On the mounted Windows folder wslc was faster and much steadier: its three rounds took 160 to 164 seconds each, while Docker Desktop took 273, 253 and 150 seconds. In its best round Docker Desktop matched wslc on small files; its other two rounds were far behind, and its large-file write was two to five times slower in every round.
The mounted-folder figures for wslc were also slower here than when it ran alone (about 45 seconds against about 39 for the small-file write). Two virtual machines were sharing one laptop, so treat the second table as a comparison under the same conditions and the first as what wslc does by itself.
A project with thousands of small files, such as a node_modules tree, a Python virtual environment or a .NET obj folder, pays the mounted-folder price on every restore, build and file watch. The faster share in WSL 3.0 does not remove that cost; it took 37 to 46 seconds to write 5,000 small files here against a third of a second on a volume. Keep dependencies and build output on a named volume, or build inside the image, and mount only the source you edit.
Networking and VPN Behaviour
VPN clients are the classic reason a container setup works at home and fails at the office. The Consommé model is meant to remove that: traffic from the virtual machine is read by a Windows process and sent with ordinary sockets as the signed-in user, so to the VPN client and the firewall it looks like any other Windows program.
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#FFF3E0','primaryTextColor':'#232F3E','primaryBorderColor':'#FF9900','lineColor':'#232F3E','signalColor':'#0073BB','signalTextColor':'#0F172A','actorBkg':'#FFF3E0','actorBorder':'#FF9900','actorTextColor':'#232F3E','noteBkgColor':'#FFF8E7','noteBorderColor':'#FF9900','noteTextColor':'#232F3E'}}}%%
sequenceDiagram
participant C as Container
participant R as Relay process (Windows, as the user)
participant N as VPN adapter and internet
C->>R: DNS query as an Ethernet frame
R->>N: Windows DNS lookup
N-->>R: Address
R-->>C: DNS answer
C->>R: TCP connection to port 443
R->>N: Ordinary Windows socket
N-->>C: Connection established through the relay
Note over R: Published ports are mapped here
I ran the network checks from a container twice with wslc, once with no VPN and once connected through NordVPN, and once with Docker Desktop while the VPN was connected.
| Check | wslc, no VPN | wslc, VPN connected | Docker Desktop, VPN connected |
|---|---|---|---|
| DNS lookup from the container | OK | OK | OK |
| Outbound TCP to port 443 | OK | OK | OK |
nginx published with -p 18090:80, from Windows on localhost | Answered | Answered | Answered |
| The same port on the laptop’s own network address | No answer | No answer | Answered |
| Whole check run, image already present | 1.2 s | 6.7 s | Not comparable (image pull included) |
DNS and outbound connections worked on the VPN with no setting changed, no MTU adjustment and no DNS override, which is the behaviour the design promises. The run took about five seconds longer with the VPN connected. That is one sample on one VPN server, so I report it without drawing a conclusion from it.
A port published with -p 18090:80 answered on localhost and did not answer on the laptop’s own network address, with or without the VPN. Docker Desktop answered on both. If you test from a phone, a second machine or another virtual machine against a container on your laptop, that will not work with wslc as configured out of the box. It is also the safer default: a container is not exposed to the network you happen to be on.
Dev Container in VS Code
The Dev Containers extension can use wslc in place of the Docker command line. Microsoft added the support in a pre-release of the extension during the preview and lists it among the integrations at general availability. It is one setting:
{
"dev.containers.dockerPath": "wslc"
}The sample has a small definition that uses the Python dev container image, forwards the service port and runs one command after creation:
{
"name": "wslc-lab-python",
"image": "mcr.microsoft.com/devcontainers/python:3.14",
"workspaceFolder": "/workspaces/wsl-containers-wslc-tested",
"forwardPorts": [8000],
"postCreateCommand": "python --version"
}With the setting in place, “Dev Containers: Reopen in Container” pulled the image, started the container and attached VS Code to it; the window reported Dev Container: wslc-lab-python and the workspace was the mounted project folder. Remember what that mount is. The workspace of a dev container opened from a Windows path is a mounted Windows folder, so the file I/O figures above apply to it. For a large repository that is a reason to keep the code in a container volume, which I did not try with wslc.
While the setting points at wslc, every dev container you open goes through WSL containers, including ones whose definition uses Docker Compose, which wslc cannot run yet. Switch it back to docker for those projects.
Docker Command Compatibility
Most of the commands are where a Docker user expects them: build, run, exec, logs, pull, push, tag, save, load, cp, inspect, stats, events, and the network and volume groups. I typed the ones people reach for without thinking and recorded which ones fail:
| Command | Result with wslc | Comment |
|---|---|---|
compose version, compose --help | Not a command | No Compose support in WSL 3.0 |
buildx version | Not a command | wslc build is the only build entry point |
context ls | Not a command | Sessions take that role: --session, wslc system session |
system df | Not a command | system offers info and session |
stats --no-stream | Option not recognised | wslc stats exists without that option |
info | Works, different content | Lists sessions, not engine details |
network ls, network create, network rm | Work | Default networks bridge, host, none |
volume create, volume ls, volume rm | Work | Drivers shown as guest and vhd |
login, push, image save, image load | Present | Help checked only; I did not push to a registry |
Scripts that call docker need more than an alias. Anything that parses docker info, passes --no-stream or calls docker compose will fail, and the failure is an exit code of 1 with the help text, which a careless script reads as output.
Microsoft calls Compose support the top feature request for WSL containers and says it is the focus of the next iterations, with the aim that existing compose.yaml files run unchanged. It gives no date. Until it ships, a project whose local environment is a Compose file (an API, a database and a queue, for example) cannot move to wslc without rewriting that file as a script of wslc run and wslc network commands.
Enterprise Management
For a managed estate the interesting part is not the command line. WSL containers come with the Windows management story Docker Desktop has to buy or build: an Intune setting that allows or blocks the feature, a registry allow list that restricts where images can be pulled from, and the existing Microsoft Defender for Endpoint plug-in for WSL, which now reports process, file and network activity from containers. Because outbound traffic is sent by a Windows process as the user, the proxy, firewall and VPN rules already applied to that user apply to container traffic too. I did not test any of these controls; they are listed in Microsoft’s announcement and the WSL enterprise documentation.
Recommendation
Whether wslc can replace Docker Desktop on a given laptop comes down to three questions, in this order.
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#FFF3E0','primaryTextColor':'#232F3E','primaryBorderColor':'#FF9900','lineColor':'#232F3E','clusterBkg':'#F8FAFC','clusterBorder':'#CBD5E1','edgeLabelBackground':'#FFFFFF','nodeTextColor':'#232F3E'}}}%%
flowchart TD
A["Developer laptop on Windows 11"] --> B{"Does the project start<br />with docker compose?"}
B -->|Yes| C["Keep Docker Desktop for now<br />and watch for Compose in WSL"]
B -->|No| D{"Do tools call the Docker API<br />or parse docker output?"}
D -->|Yes| E["Test those tools first<br />before removing Docker"]
D -->|No| F{"Must other devices reach<br />a published port?"}
F -->|Yes| E
F -->|No| G["wslc is enough:<br />build, run, volumes, dev containers"]
G --> H["Keep dependencies and build output<br />on volumes, not on mounted folders"]
classDef compute fill:#FFF3E0,stroke:#FF9900,stroke-width:2px,color:#232F3E
classDef db fill:#EBF8FF,stroke:#0073BB,stroke-width:2px,color:#004C74
classDef store fill:#F0FFF4,stroke:#1D8102,stroke-width:2px,color:#145202
classDef alert fill:#FEF2F2,stroke:#D13212,stroke-width:2px,color:#991B1B
classDef mesh fill:#F3E8FF,stroke:#7C3AED,stroke-width:2px,color:#4C1D95
class A,B,D,F compute
class C,E alert
class G store
class H db
- Single-container work is ready. Building, running, logs, exec, volumes and a VS Code dev container all worked with familiar commands and unremarkable timings.
- Compose is the gap. There is no
composecommand and no date for one. For many teams that alone keeps Docker Desktop installed. - Mounted Windows folders are slow on both engines. About a hundred times slower than a volume for small files with
wslc, and slower again with Docker Desktop on this laptop. Design the inner loop around volumes. - The VPN was a non-event. DNS and outbound connections worked on NordVPN with nothing changed, as the relay design intends.
- Published ports stay on localhost. Good as a default, and a surprise if you test from another device.
My recommendation is to start using wslc for image builds and single-service work now, with Docker Desktop still installed. Move a team off Docker Desktop only after Compose support arrives or after the team’s Compose files have been replaced. If you run it on your own project and see different file I/O numbers, leave a comment; one laptop is a small sample.
A note on testing: I ran this on one laptop with WSL 3.0 on Windows 11 Pro Insider Preview, using the script in the sample. Build and run figures are from a single run. File I/O was run in three rounds per storage type; for the container file system in the first table only two rounds were captured, because the image pull hid the first one. The mounted folder was under the user’s temp directory on the system drive, and I did not turn off or control antivirus scanning, which affects small-file figures on Windows. The Docker Desktop comparison covers file I/O and networking only, not builds or startup, and both engines’ virtual machines were running during it. The VPN check is one run on one NordVPN server. The check against the laptop’s network address was made from the laptop itself, not from a second device. The dev container was opened once and I did not time it. I did not test Compose alternatives, pushing to a registry, GPU access, the WSL container API, tools that use the Docker Engine API such as Testcontainers, multi-platform builds, memory use, or the Intune and Defender controls.
The complete sample for this article is on GitHub: nithinmohantk/blog-samples-working-repo/wsl-containers-wslc-tested. Clone it with git clone https://github.com/nithinmohantk/blog-samples-working-repo.git and open the wsl-containers-wslc-tested folder. Its README says how to run it and what has been verified.
References & Further Reading
- → WSL containers now generally available— Windows Developer Blog: what shipped, enterprise controls and the Compose plan
- → WSLC Architecture deep dive— Windows Command Line blog: sessions, storage, virtiofs and the Consommé network model
- → WSL container overview— Microsoft Learn: the command line and the API
- → Get started with WSL container— Microsoft Learn: step-by-step tutorial
- → WSL container is now available for public preview— The June post that introduced the dev container setting
- → WSL 3.0.1 release notes— The release that marked WSL containers generally available
- → Enterprise environment: set up WSL for your company— Intune and Defender for Endpoint guidance
- → Sample code for this article— The lab script, both applications and the recorded output
Discover more from C4: Container, Code, Cloud & Context
Subscribe to get the latest posts sent to your email.