docker, windows 10,

Install Docker on Windows 10 without Docker Desktop

Dec 13, 2021 · 1 min read · Post a comment

In today’s topic I’m going to cover on how to install and run Docker on Windows 10 without Docker Desktop. This means we’ll be using WSL (Windows Subsystem for Linux).

Prerequisites

Solution

Note(s): The following steps will be based on Ubuntu WSL, and it follows the official Docker installation for Ubuntu.

Step 1. First, open Terminal and update package index.

sudo apt-get -y update

Step 2. Install the prerequisite packages.

sudo apt-get -y install ca-certificates curl gnupg lsb-release

Step 3. Install the ca-certificates package.

sudo apt-get install -y ca-certificates

Step 4. Add the official Docker’s GPG key.

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

Step 5. Set up the stable repository.

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

Step 6. Again, update the package index.

sudo apt-get -y update

Step 7. Install Docker.

sudo apt-get -y install docker-ce docker-ce-cli containerd.io

Step 8. Start the Docker service.

sudo service docker start

Step 9. Finally, verify installation.

sudo docker run hello-world

Conclusion

If you have encountered any errors along the way please let me know. Also, I would suggest Podman as a better (lightweight and secure) alternative. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.