Technical Anshu
Tutorials Blog
🐳 Docker Setup Guide

Install Docker on Windows with WSL 2 and Run Your First Container

Docker on Windows works best on a real Linux kernel, and WSL 2 gives you exactly that. This guide installs things in the order that avoids the classic errors - WSL 2 first, Docker Desktop second, and one small test container to prove the whole chain works.

✍️ Technical Anshu🪟 Windows 10 / 11⏱️ 10 minute setup and read
🎥 Watch the full install in the video - WSL 2 setup and the first container, step by step

Most failed Docker installs on Windows fail for one boring reason: the order was wrong. Docker Desktop expects a working WSL 2 underneath it, so we build the foundation first, check it, and only then install Docker. At the end you will run hello-world - a tiny container that proves the client, the engine, the network and the image store all work. Follow the video above for the on-screen walkthrough; this page is the written checklist with the honest warnings included.

Windows PowerShell - the two commands that prove the install (real output style)
PS C:\Users\Anshu> docker --version Docker version 27.x, build xxxxxxx PS C:\Users\Anshu> docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world Hello from Docker! This message shows that your installation appears to be working correctly.
What success actually looks like - the version line, the first pull, and Docker's own confirmation message
1

First Check Your PC Can Do This

Docker Desktop with the WSL 2 backend needs three things. Skipping this check is how people lose an evening.

  1. Windows 10 version 2004 or later, or Windows 11 - check with winver
  2. Virtualisation switched on in BIOS or UEFI - open Task Manager, go to Performance, then CPU, and look for Virtualization: Enabled. If it says Disabled, no software setting will save you; enable Intel VT-x or AMD SVM in the BIOS first
  3. About 4 GB of free RAM and a few GB of disk - WSL 2 and Docker share your machine, they do not replace it

Honest note: on Windows Home editions this WSL 2 route is not a workaround, it is the intended route. Hyper-V is not required for it.

2

Install WSL 2 Before Anything Else

Open PowerShell as Administrator and run one command:

  1. wsl --install
  2. Let it finish, then restart the PC - this step is not optional, the restart loads the virtualisation components
  3. After the restart, Ubuntu (the default distro) finishes its own setup and asks you to create a Linux username and password. That password is for Linux sudo only - pick one you will remember, because nothing is shown on screen while you type it
  4. Confirm the foundation with wsl --status and wsl -l -v - your distro should show VERSION 2. If it shows 1, run wsl --set-default-version 2 and convert the distro as the command output suggests

There is a full page in this set on why this order matters and what breaks when Docker goes in first.

3

Install Docker Desktop on Top

  1. Download Docker Desktop only from docker.com - third-party download sites bundle junk with popular installers
  2. Run the installer and keep the option Use WSL 2 instead of Hyper-V ticked - on most PCs it is ticked by default
  3. When the installer asks, let it close and log you out or restart if prompted. Docker adds your Windows account to the local docker-users group, and group membership only takes effect on a fresh sign-in
  4. Start Docker Desktop and wait for the whale icon in the system tray to settle and the dashboard to report Engine running. The first start is slow; give it a couple of minutes
  5. Accept the Docker Subscription Service Agreement screen honestly - it is a real licence, and the licensing page in this set explains when Docker Desktop is free and when a business must pay
4

Prove It with Hello World

Open a fresh PowerShell or Terminal window and run:

  1. docker --version - proves the client is installed and on your PATH
  2. docker run hello-world - proves everything else. Docker cannot find the image locally, downloads it from Docker Hub, creates a container from it, runs it, and prints its message
  3. If the message appears, your chain works end to end: terminal, client, engine inside WSL 2, network, and registry

Honest note: the first run needs the internet for the pull. If it fails, do not reinstall blindly - the won't-start ladder page in this set works through the causes in order.

5

Two Honest Warnings Before You Go Further

docker-users means power. Anyone in that group can run containers, and a container can mount the whole Windows drive - treat docker-users membership as administrator-level trust and only add accounts you would hand the machine to.

Keep project files inside Linux. Code stored in the WSL filesystem (your Ubuntu home folder) is dramatically faster for containers than the same files reached through /mnt/c. Move active projects into Linux and open them from there.

🔴 Docker Desktop is free for personal use and small businesses under Docker's published size thresholds - and a paid per-user subscription for larger companies. If you are installing this on an office machine, read the licensing page in this set before your IT or audit team asks the question first.

🎥 Watch the Complete Process in the Video

See the complete setup in the video - WSL 2 install, Docker Desktop install and the first container running live.

▶️ Watch Full Video
❓ Frequently Asked Questions

Is Docker Desktop free on Windows?

For personal use, education and small businesses under Docker's published employee and revenue thresholds, yes, Docker Desktop is free. Larger companies need a paid per-user subscription. Docker Engine on a Linux server is a separate, open-source route and is covered in the licensing page of this set.

Do I need Windows 11 Pro or Hyper-V for Docker with WSL 2?

No. The WSL 2 backend works on Windows 10 Home and Windows 11 Home as well. You need virtualisation enabled in the BIOS and a recent enough Windows build. Hyper-V is only needed for the older Hyper-V backend, which this guide does not use.

Docker Desktop is stuck on starting. What should I check first?

Check in this order: virtualisation shows Enabled in Task Manager, wsl --status runs cleanly and your distro is version 2, the Docker Desktop Service is running in services.msc, and you have signed out and back in since installing so the docker-users group applies. The fix ladder page in this set goes through each step.

This guide is based on the Technical Anshu Docker on WSL 2 video • Stuck on any step? Ask in the video comments — you will get a reply there 🙏