
If sharing the Docker daemon between WSL instances is desired, configure it to use a socket stored in the shared /mnt/wsl directory.Instead of using an init system such as systemd to launch the Docker daemon, launch it by calling dockerd manually.This article attempts to explore such a process and options along the way.Ĭontrary to what the length of this article might suggest, getting Docker working on WSL is fairly simple. However, due to both WSL and Docker complexities, a little tender loving care is required to get Docker up and running. Docker works on WSL 2, and without requiring the robust but heavy Docker Desktop if that is undesirable. Windows Subsystem for Linux 2 sports an actual Linux kernel, supporting real Linux containers and Docker. And further emphasis on the optional nature of the /mnt/wsl/shared-docker socket directory. A little more suggestion about TCP access, as well.

Updated April 10, 2022, with current Alpine instructions, Debian/Ubuntu package signing tweaks (no more apt-key), and better guidance for handling iptables in Debian.
