DEV Community

JohnOdhiambo
JohnOdhiambo

Posted on

Run Docker on WSL without Docker Desktop

You need to have first install WSL and Ubuntu, Debian or any other Linux Distribution of your preference on your windows computer.
To install the Docker Community Engine, run the following scripts

Update your package lists and upgrade existing packages

$ sudo apt update && sudo apt upgrade -y

Install necessary packages to allow apt to use repositories over HTTPS

$** sudo apt install apt-transport-https ca-certificates curl software-properties-common -y**

🐳 Download and save Docker’s official GPG key

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

🐳 Add Docker’s stable repository to your APT sources list

$ echo "deb [arch=amd64 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

Update package index again, now with Docker packages included

$ sudo apt update

🐳 Finally, install the Docker Engine

$ sudo apt install docker-ce -y

Top comments (0)