Docker ↔ wslc cheat sheet
A single-page reference for translating between the Docker CLI and wslc, the
WSL containers runtime on Windows 11. Colour tells you the risk: green is a
byte-for-byte match, blue changed name only, amber works but behaves differently, red has no
equivalent in the current preview.
For whole scripts, the command converter applies these rules automatically and flags the ones that need a human decision.
Commands
| Docker | wslc | Status | Notes |
|---|---|---|---|
docker run | wslc run | Identical | Core flags (-d, -p, -v, -e, --name, --rm, -it) behave the same. |
docker build | wslc build | Identical | Supports -t, -f, --build-arg. BuildKit-style output. |
docker pull | wslc pull | Identical | OCI registries, including Docker Hub, GHCR and ACR. |
docker push | wslc push | Identical | Requires wslc login for private registries. |
docker ps | wslc container list | Renamed | wslc ps is accepted as an alias in recent previews. |
docker ps -a | wslc container list --all | Renamed | Use --all to include stopped containers. |
docker images | wslc image list | Renamed | Grouped under the image noun. |
docker rmi | wslc image remove | Renamed | Accepts image ID or tag. |
docker rm | wslc container remove | Renamed | Use -f to force removal of a running container. |
docker stop | wslc stop | Identical | Sends SIGTERM then SIGKILL after the grace period. |
docker start | wslc start | Identical | — |
docker restart | wslc restart | Identical | — |
docker exec | wslc exec | Identical | Supports -it and -u for interactive shells. |
docker logs | wslc logs | Identical | Supports -f and --tail. |
docker inspect | wslc inspect | Partial | JSON shape follows OCI, not the Docker schema. Scripts that parse .NetworkSettings need updating. |
docker stats | wslc stats | Identical | Reports CPU, memory and IO from the utility VM. |
docker cp | wslc cp | Identical | Host paths use Windows syntax on the host side. |
docker tag | wslc tag | Identical | — |
docker login | wslc login | Identical | Credentials are stored per Windows user. |
docker system prune | wslc system prune | Partial | Prunes images and stopped containers. No build cache pruning yet. |
docker volume create | wslc volume create | Partial | Named volumes live inside the utility VM. Bind mounts use VirtioFS. |
docker network create | wslc network create | Partial | Bridge networking only. Traffic routes through the Windows host stack. |
docker compose up | (no direct equivalent) | Not supported | No built-in Compose runtime. Translate services to individual wslc run calls or drive them from a script. |
docker swarm | (no equivalent) | Not supported | Orchestration is out of scope for wslc. Use Kubernetes or Docker for swarm workloads. |
docker buildx bake | (no equivalent) | Not supported | Multi-platform bake files are not supported in the preview. |
Flags for run and build
| Docker flag | wslc flag | Status | Notes |
|---|---|---|---|
-d, --detach | -d, --detach | Identical | Run in background. |
-p, --publish | -p, --publish | Identical | Reachable on Windows localhost with no extra proxy step. |
-v, --volume | -v, --volume | Partial | Host paths shared over VirtioFS. Use forward slashes: C:/work:/app. |
-e, --env | -e, --env | Identical | Quote values containing spaces. |
--env-file | --env-file | Identical | — |
--name | --name | Identical | The container name is also its DNS name on a user-defined network. |
--rm | --rm | Identical | — |
-it | -it | Identical | Interactive TTY works in Windows Terminal and PowerShell. |
-u, --user | -u, --user | Identical | — |
-w, --workdir | -w, --workdir | Identical | — |
--entrypoint | --entrypoint | Identical | — |
--gpus all | --device nvidia.com/gpu=all | Renamed | CDI-based. Passes /dev/dxg for CUDA and DirectML. |
--network | --network | Partial | Bridge only. --network host is redundant and ignored. |
--platform | — | Not supported | Host architecture only. No cross-building. |
--restart | — | Not supported | No restart policies. Use a Windows scheduled task. |
--memory | --memory | Partial | Bounded by the utility VM allocation, not host total. |
--cpus | --cpus | Partial | Bounded by the utility VM allocation. |
--health-cmd | — | Not supported | No healthchecks. Poll with wslc exec from a script. |
Conventions that differ
| Topic | Docker Desktop | wslc |
|---|---|---|
| Host path syntax | C:\work:/app or /mnt/c/work:/app | C:/work:/app — forward slashes; a backslash is an escape character |
| Host file sharing | 9p / gRPC-FUSE | VirtioFS, up to 2× faster |
| Published port on Windows | NAT plus port proxy | Direct on host stack; curl.exe localhost:PORT just works |
| VPN and proxy | Needs per-container config | Inherited from Windows automatically |
| Control channel | dockerd over named pipe | Daemonless; host service starts a VM on demand |
inspect output | Docker JSON schema | OCI schema — scripts parsing .NetworkSettings break silently |
| Image store | Shared with Compose, buildx | Separate store; images must be pulled again |
| Idle memory | ~1–2 GB resident | ~0 when no containers run |
Common recipes
# smoke test
wslc run --rm alpine echo ok
# web server, reachable at http://localhost:8080 from Windows
wslc run -d -p 8080:80 --name web nginx:alpine
# interactive shell with the current directory mounted
wslc run --rm -it -v "$($PWD.Path -replace '\\','/'):/app" -w /app node:22 bash
# GPU workload (note the flag differs from Docker)
wslc run --rm --device nvidia.com/gpu=all nvidia/cuda:12.4-base nvidia-smi
# build and tag
wslc build -t myapp:dev .
# user-defined network so containers resolve each other by name
wslc network create appnet
wslc run -d --name db --network appnet postgres:16-alpine
wslc run -d --name api --network appnet -p 3000:3000 myapp:dev
# readiness probe replacing a Compose healthcheck
wslc exec db pg_isready -U postgres
# logs and stats
wslc logs -f web
wslc stats
# clean up
wslc stop web; wslc container remove web
wslc system prune Not supported at all
These have no wslc path in the public preview. If your workflow depends on one, keep Docker for that project — the two runtimes coexist without conflict.
- Compose — no
wslc compose. See the migration guide for the manual translation. - Swarm, services, stacks, secrets, configs.
- Kubernetes — no bundled cluster.
- buildx / bake and multi-platform builds.
- Restart policies and container healthchecks.
- Windows containers — wslc runs Linux images only.
- Docker socket compatibility — Testcontainers and socket-dependent tooling will not attach.
FAQ
- What is the wslc equivalent of docker ps?
- wslc container list. Add --all to include stopped containers. Recent previews accept wslc ps as an alias, but the noun form is the stable one.
- What is the wslc equivalent of docker images?
- wslc image list. Image management commands are grouped under the image noun: wslc image remove, wslc image history, wslc image search.
- How do I pass a GPU to a wslc container?
- Use --device nvidia.com/gpu=all instead of Docker’s --gpus all. wslc uses the Container Device Interface and passes /dev/dxg through to the container.