What are the prerequisites to install Docker on Windows?
To install and run Docker Desktop on Windows, you need the following:
1. Hardware Requirements
|
Requirement |
Minimum |
|---|---|
|
Processor |
64-bit processor with SLAT support |
|
RAM |
8 GB |
|
Virtualization |
Enabled in BIOS/UEFI |
|
Disk Space |
Sufficient free storage for Docker and container images |
2. Software Requirements
-
Windows OS: Supported 64-bit Windows 10 or Windows 11 version.
-
WSL 2: Windows Subsystem for Linux 2 must be installed.
-
WSL Version: 2.1.5 or later.
-
Virtualization: Hardware virtualization must be enabled.
Docker Desktop generally uses WSL 2 to run Linux containers on Windows.
3. Required Tools
|
Tool |
Purpose |
|---|---|
|
Docker Desktop |
Provides the Docker environment on Windows. |
|
WSL 2 |
Provides a Linux environment for Docker. |
|
PowerShell / CMD |
Execute Docker commands. |
4. How to Check Prerequisites
Open PowerShell and execute:
Check Windows version:
winver
Check WSL version:
wsl --version
Check virtualization:
Open Task Manager → Performance → CPU.
Check whether Virtualization shows Enabled.
5. Install WSL 2
Open PowerShell as Administrator:
wsl --install
Update WSL:
wsl --update
Restart your computer if prompted.
6. Install Docker Desktop
Download Docker Desktop from the official website:
Download Docker Desktop for WindowsRun the installer and select the WSL 2 backend.
Key Points
-
WSL 2 is the recommended backend for most Windows users.
-
Hardware virtualization must be enabled.
-
Minimum 8 GB RAM is required.
-
Windows Home supports Linux containers, but not Windows containers.
-
Windows Pro or Enterprise is required for Windows container workloads.
My recommendation: For learning Docker with ASP.NET Core Web API, install Docker Desktop with the WSL 2 backend. You don't need to install a separate Linux operating system.
How to Install Docker on Windows – Step-by-Step
We will install Docker Desktop on Windows using the WSL 2 backend. This is the recommended approach for most Windows users.
Step 1: Check System Requirements
Before installation, check the following:
|
Requirement |
Details |
|---|---|
|
OS |
Supported Windows 10 / Windows 11 |
|
Architecture |
64-bit processor |
|
RAM |
Minimum 8 GB |
|
Virtualization |
Enabled in BIOS/UEFI |
|
WSL |
WSL 2.1.5 or later |
Docker Desktop supports Linux containers on Windows Home and other supported editions. Windows containers require Windows Pro or Enterprise.
Step 2: Enable WSL 2
What is WSL 2?
WSL stands for Windows Subsystem for Linux. It allows Linux environments to run on Windows without manually managing a traditional virtual machine.
-
Open PowerShell as Administrator.
-
Execute the following command:
wsl --install
3. Restart your computer if prompted.
Update WSL:
wsl --update
Check the installed version:
wsl --version
Step 3: Download Docker Desktop
-
Visit the official Docker website.
-
Download Docker Desktop for Windows.
Docker Desktop
Download Docker DesktopOfficial Docker websiteStep 4: Install Docker Desktop
-
Open the downloaded
Docker Desktop Installer.exe. -
Run the installer.
-
Choose the recommended per-user installation.
-
Select WSL 2 as the backend when prompted.
-
Follow the installation instructions.
-
Click Close when installation completes.
Step 5: Start Docker Desktop
-
Open Windows Start Menu.
-
Search for Docker Desktop.
-
Open Docker Desktop.
-
Accept the Docker subscription agreement.
-
Wait until Docker Desktop finishes starting.
Step 6: Verify Docker Installation
Open Command Prompt or PowerShell.
Check Docker version:
docker --version
Check Docker Engine status:
docker info
Run a test container:
docker run hello-world
Docker will download the hello-world image (when it is not already available locally), create a container, and display a success message.
Your Docker installation is working if the test displays:
Hello from Docker!
This message shows that your
installation appears to be working correctly.
Step 7: Try Some Basic Docker Commands
|
Command |
Purpose |
|---|---|
|
|
Check Docker version |
|
|
List downloaded images |
|
|
List running containers |
|
|
List all containers |
|
|
Download an image |
|
|
Create and run a container |
|
|
Stop a container |
|
|
Remove a container |
Final Installation Flow
Windows 10 / Windows 11
|
v
Enable WSL 2
|
v
Download Docker Desktop
|
v
Install Docker Desktop
|
v
Start Docker Desktop
|
v
Run Docker Command
|
v
docker run hello-world
|
v
Docker Working!
Next practical step: Once Docker is installed, we can create your first ASP.NET Core Web API Docker Image and run it inside a Docker Container.