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.
📑Chapters
- Why the order matters — WSL 2 first, Docker Desktop second
- Checking the PC first — Windows version with winver and virtualisation in Task Manager
- Installing WSL 2 with one command, restarting, and finishing the Ubuntu first run
- Verifying WSL — status, the distro list, and the default version 2 check
- Installing Docker Desktop with the WSL 2 backend
- Running the first container — docker --version and hello-world
- The honest checks — Docker Desktop licensing and the docker-users group
📋 Overview & Step-by-Step Guide
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.
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.
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:
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.
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.Verify WSL 2 Is Really Ready
Before Docker goes anywhere near the machine, confirm the foundation with two commands:
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:
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.
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.
docker command inside Ubuntu as well as in PowerShell, open Docker Desktop Settings, go to Resources, then WSL Integration, and switch on your distro.Run Your First Container — Hello World
Open a fresh PowerShell or Terminal window and run the two commands that prove the whole chain works:
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.
🏷️Topic Search Variables & Keywords
🎙️ 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