- Download the latest latest-distrod-wsl-launcher and start the launcher
- Select
Ubuntu
andfocal
in the available options and continue to install - It asks for username and password as part of the installation process
- Verify is
systemd
is running usingps -ef | grep -i systemd
-
Update OS and Install latest libs
sudo apt-get update sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release
-
Add GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
-
Setup stable repo
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
-
Install docker engine
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
-
To use docker as non-root user
sudo usermod -aG docker $USER
-
Automatically start on startup
sudo systemctl enable docker.service sudo systemctl enable containerd.service