

To verify that it works, you can run docker version. To your /etc/wsl.conf within your WSL distribution. If you are running Windows 11, make sure you are using the Windows Subsystem for Linux installed from the Microsoft Store, since it supports Systemd starting from version 0.67.6 onwards (you can check with wsl.exe -version). Make Docker Daemon start on WSL initialization: $ sudo usermod -aG docker $USER # Now, close your shell and open another for taking the group changes into account $ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin $ echo \ "deb \ $ (lsb_release -cs ) stable " | sudo tee /etc/apt//docker.list > /dev/null $ curl -fsSL | sudo gpg -dearmor -o /etc/apt/keyrings/docker.gpg $ sudo apt-get install \ ca-certificates \ $ sudo apt-get remove docker docker-engine docker.io containerd runc # Ensures not older packages are installed Install Docker CE on Ubuntu by following the official guide: I will consider that you already have WSL2 working, and you are using Ubuntu as your distribution.


you cannot run docker from Windows PowerShell) Docker Daemon sharing between Windows and WSL (i.e.Docker Daemon automatic start without any crazy hacks.A full-fledged Docker installation on WSL2.I am not claiming that any other guide does it in a wrong way. PS: the title says right way, but it is just my personal opinion. This is a straight to the point guide on how to make Docker CE run fully on WSL2. So, now that Docker Desktop is paid under certain scenarios, you may want to switch to something else.
