Docker in WSL, looked after.
Docker Engine inside a WSL distro, without Docker Desktop. The WSL page shows how WSL is set up and changes it when you ask: the .wslconfig, a disk file that only grows, ports for your network, DOCKER_HOST for the programs on Windows, and a restart when WSL hangs after sleep. Each change asks first.
A kitchen inside your own house?Read the comic: house rules on the wall, lights that come back after the night, and a hatch to the street →What you can do
Containers of WSL itself
wslc comes with WSL 2.9.3 and newer, without Docker and without a Docker API. A WSLC page, only there when wslc is, shows its containers, images, volumes and networks: start, stop, remove, logs, inspect, a terminal, and CPU, memory, network and disk over time. It refreshes the moment something changes, and a container that stops by itself gives a notification. The pages of Docker stay as they are.
Between Docker and wslc
Copy to wslc in the menu of an image puts it in wslc, and Copy to Docker on the WSLC page brings one back, through a temporary file that goes away afterwards. A new, empty wslc gets the images you already have.
Run, build and push in wslc
Run a container with ports, environment, volumes, a network, a command and a health check. Pull an image, tag it, build one from a folder with a Dockerfile or a Containerfile, push it after a question that names the registry, and log in to a registry with the password going to wslc directly.
The settings of wslc
Processors, memory, disk and storage of the session, the address published ports listen on, the name of Windows inside a container, the idle time of a session and where registry logins are kept, in settings.yaml with its comments intact. A restart of the session asks first, since its containers stop.
Move over from Docker Desktop
Images, named volumes, compose projects and loose containers to the Docker in your distro, in one wizard, with what the other side already has next to it. Docker Desktop stays as it was.
How WSL is set up
The WSL version, the distro with Docker in it, the network mode (mirrored or NAT), memory and processors, on one page.
.wslconfig with a preview
Memory, processors, swap, networking, the idle timeout and more in a dialog with three tabs, which marks a tab with a change or a mistake in it. It shows the change before saving, and keeps the old file next to it.
A disk file that shrinks
The disk file of a distro only grows. Trim it, shut WSL down, compact the file and start again, in one go; Windows asks for permission once.
A port for your network
Make a port reachable from other devices, with the firewall rule that goes with it; on private and domain networks only, unless you choose otherwise.
DOCKER_HOST for Windows
Programs on Windows, such as testcontainers or your IDE, find the Docker in WSL. Set or remove DOCKER_HOST with one click, and see where the docker CLI points.
After sleep
WSL now and then hangs after the laptop sleeps. The app notices, sends a notification, and offers Restart WSL.
A distro that went to sleep
WSL stops a distro without an open session after 15 seconds. The dashboard says which one, with the button to start it and its Docker again.
The checkup knows WSL
A credsStore that Docker Desktop left behind, containers that cannot resolve names, a daemon that does not start with the distro, bind mounts from /mnt/c, and programs that find no Docker at all.
Fixes with one click
Remove the credsStore, with a backup of the file, and enable the Docker service in the distro so it starts by itself.
Ports and loopback
With mirrored networking, whether this computer reaches a published port on localhost, and the Hyper-V firewall rule a port needs from another machine.
In a swarm
A WSL node belongs on drain: traffic between machines does not reach it. The app points it out, and the checkup checks it.
Only where it applies
WSL texts, checks and buttons show only when the engine really runs in WSL on this computer. A Linux machine never hears about WSL.
Docker in WSL, without Docker Desktop
Two small steps, and the app finds your distro.
Let the daemon in your WSL distro listen on localhost as well as on its socket, then point a context at it. Bind port 2375 to 127.0.0.1 only: it has no authentication. On systemd distros, also remove the -H fd:// flag from the service. Programs on Windows follow once DOCKER_HOST points there too.
Moving over
Everything from Docker Desktop, in one go.
When Docker Desktop and Docker in WSL both run on this computer, the Machines page offers to move over. The wizard puts both sides next to each other: per image whether WSL already has it, per volume its size and who uses it, the compose projects, and what does not move along. Images and volumes are copied one by one, each with its own progress; a project moves with its files, ports and data. A folder under C:\ that a project mounts can stay where it is: in WSL it is the same folder, through /mnt/c. Nothing is removed from Docker Desktop: that is yours to do once everything runs in WSL.
After the night
The lights come back on, or the app tells you they did not.
After a sleep, WSL sometimes wakes up without its network, and every docker command hangs. Fifteen seconds after waking, the app checks whether Docker answers. If it does not, a notification says so and opens the WSL page, where Restart WSL shuts WSL down, starts the distro again and brings its Docker back up.
Room to breathe
A disk file of 17 GB, back to under 12.
Deleted images and volumes do not give their space back to Windows: the disk file of the distro only grows. Shrink disk file trims the distro first, then shuts WSL down, compacts the file with Windows’ own tools and starts everything again. Your containers come back as they were; only the empty space is gone.
The containers of WSL itself
Next to Docker, a page for wslc.
Since 2.9.3, WSL brings a container tool of its own: wslc. It has no Docker API, so the app speaks its command line. When wslc is on your computer, a WSLC page appears in the sidebar, with its containers, images, volumes and networks in four tabs, and per container a menu to stop, restart, open a terminal, read the logs, see its measurements over time, inspect or remove it. Docker stays what the app is for: its pages do not change, and on the WSL page wslc is one line with a link.
All features