Technical Anshu Home › Tutorials › Docker on WSL 2
🐳 Docker Setup Guide

Docker Install on WSL 2 - First Container Setup

Install Docker Desktop on Windows 10 or 11 using the WSL 2 backend — WSL first, then Docker, then a verified hello-world container. Includes the honest checks for virtualisation, licensing and the docker-users group.

✍️ Technical Anshu🪟 Windows 10 / 11🎧 Multi-Language Audio
Docker Install on WSL 2 - First Container Setup
🎧 Multi-Language Audio: In the video player, click [Settings] (⚙️) ➔ [Audio track] to select your preferred audio.

📑Chapters

  1. Why the order matters — WSL 2 first, Docker Desktop second
  2. Checking the PC first — Windows version with winver and virtualisation in Task Manager
  3. Installing WSL 2 with one command, restarting, and finishing the Ubuntu first run
  4. Verifying WSL — status, the distro list, and the default version 2 check
  5. Installing Docker Desktop with the WSL 2 backend
  6. Running the first container — docker --version and hello-world
  7. The honest checks — Docker Desktop licensing and the docker-users group

📋 Overview & Step-by-Step Guide

1

Check Your PC First

Docker Desktop with the WSL 2 backend needs three things, and skipping this two-minute check is how people lose an evening. First, the Windows version: you need Windows 10 version 2004 or later, or Windows 11. Press Win + R, type winver and press Enter to see your exact version.

Run Dialog
winver

Second, virtualisation must be switched on in the 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. Third, keep about 4 GB of free RAM and a few GB of disk spare: WSL 2 and Docker share your machine, they do not replace it.

📌 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

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 build the foundation first. Open PowerShell as Administrator and run one command:

PowerShell (Admin)
wsl --install

Let it finish, then restart the PC — the restart is not optional, it loads the virtualisation components. After the restart, Ubuntu (the default distro) finishes its own setup and asks you to create a Linux username and password.

⚠️ That Linux password is for sudo only — pick one you will remember, because nothing is shown on screen while you type it. And do not leave the distro half-created: a distro whose first run was never finished is the most common hidden cause of Docker Desktop hanging at its first start.
3

Verify WSL 2 Is Really Ready

Before Docker goes anywhere near the machine, confirm the foundation with two commands:

PowerShell
wsl --status
wsl -l -v

Your distro should show VERSION 2 in the list. If it shows 1, set the default version and convert the distro as the command output suggests:

PowerShell
wsl --set-default-version 2

Each layer is tested before the next one goes on, so if something fails later you know exactly which layer owns the problem.

4

Install Docker Desktop on Top

Download Docker Desktop only from docker.com — third-party download sites bundle junk with popular installers. Run the installer and keep the option Use WSL 2 instead of Hyper-V ticked; on most PCs it is ticked by default.

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 — this is the honest check most guides skip, and it is why Docker sometimes refuses to start until you sign out and back in.

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. Accept the Docker Subscription Service Agreement screen honestly — it is a real licence.

✅ Tip: to use the docker command inside Ubuntu as well as in PowerShell, open Docker Desktop Settings, go to Resources, then WSL Integration, and switch on your distro.
5

Run Your First Container — Hello World

Open a fresh PowerShell or Terminal window and run the two commands that prove the whole chain works:

PowerShell
docker --version
docker run hello-world

docker --version proves the client is installed and on your PATH. 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 Hello from Docker! message. If that message appears, your chain works end to end — terminal, client, engine inside WSL 2, network, and registry.

⚠️ Two honest warnings. First, the first run needs the internet for the pull — if it fails, do not reinstall blindly; check which layer (WSL, engine, network) actually failed. Second, Docker Desktop is not simply "free" for everyone: it is free for personal use, education, non-commercial open source and small businesses under the size limits Docker publishes, and a paid per-user subscription for larger companies. If you are installing it at work, check which side of that line your company is on.

🏷️Topic Search Variables & Keywords

🔍 Docker 🔍 Docker Desktop 🔍 WSL 2 🔍 Docker Install Windows 🔍 hello-world Container 🔍 docker-users Group 🔍 Virtualization 🔍 Ubuntu on Windows 🔍 Docker on Windows 10 🔍 Docker on Windows 11 🔍 First Container Setup 🔍 TechnicalAnshu
🎙️ Full Transcript — tap to expand

Step-by-Step Troubleshooting Guide & Solutions - DOCKER INSTALL DONE RIGHT WSL 2 ON WINDOWS. On-screen demonstration by Technical Anshu....

(transcript ends here on the source page)

❓ Frequently Asked Questions

Is this tutorial 100% free to follow?

Yes! All guides and methods demonstrated by Technical Anshu use free, legal, and educational resources.

Can beginners follow this guide?

Absolutely! Every step is demonstrated on-screen with detailed instructions so anyone can follow along easily.

Where can I ask questions if I get stuck?

Leave a comment directly on the YouTube video, and our community and Technical Anshu will help you out.

🚀 Watch the Full Tutorial on YouTube

🚀 Watch the full step-by-step video tutorial on YouTube: https://www.youtube.com/watch?v=L8i0DXhEquo

Subscribe to Technical Anshu for IT support, Windows troubleshooting, and server management.

▶️ Watch Full Video
This tutorial is based on Technical Anshu's Docker Install on WSL 2 video • Stuck on any step? Ask in the video comments — you will get help there 🙏