Install Docker on Windows

This guide installs Docker Desktop on Windows 10 / Windows 11.

System Requirements

RequirementMinimum
OSWindows 10 64-bit (Build 19041+) or Windows 11
RAM4 GB (8 GB recommended)
Disk20 GB free space
CPU64-bit processor with hardware virtualization
FeatureWSL 2 (Windows Subsystem for Linux 2) - Docker will help install this

Step 1 - Download Docker Desktop

Go to the official Docker website and download Docker Desktop for Windows:

https://www.docker.com/products/docker-desktop/

Click "Download for Windows" - it will download a file called Docker Desktop Installer.exe.

Step 2 - Install Docker Desktop

  1. Double-click Docker Desktop Installer.exe
  2. The installer will ask: "Use WSL 2 instead of Hyper-V" - leave it checked (recommended)
  3. Click OK and wait for installation to finish
  4. Click Close and restart - your computer will restart

Step 3 - Start Docker Desktop

After restarting:

  1. Open Docker Desktop from the Start Menu
  2. Accept the Docker Subscription Service Agreement
  3. Wait for Docker to fully start - you will see the whale icon in the system tray
Docker is ready when:Docker Desktop shows Docker Desktop is running in the Windows system tray.

Step 4 - Verify Docker is Installed

Open PowerShell or Command Prompt and run:

docker --version

Expected output

Docker version 27.x.x, build xxxxxxx
docker info

This shows detailed info about your Docker installation - number of containers, images, storage driver, etc.

Step 5 - Run Your First Container

docker run hello-world

Expected output

Hello from Docker!
This message shows that your installation appears to be working correctly.

What happened:

  1. Docker looked for the hello-world image locally and did not find it.
  2. Docker pulled the image from Docker Hub automatically.
  3. Docker created a container from that image.
  4. The container ran, printed the message, and exited.

Step 6 - Run a Real Web Server

Let's run nginx (a web server) to confirm everything works:

docker run -d -p 8080:80 --name my-nginx nginx

Now open your browser and go to: http://localhost:8080

You should see the nginx welcome page - a web server running inside a Docker container on your machine.

To stop it:

docker stop my-nginx
docker rm my-nginx

Enable WSL 2 (If Needed)

Docker Desktop uses WSL 2 on Windows. If it was not already installed, Docker will prompt you. If you need to do it manually:

Open PowerShell as Administrator and run:

wsl --install

Then restart your computer. Docker Desktop will work with WSL 2 automatically.

Common Installation Problems

Problem 1 - Virtualization not enabled

Error messageHardware-assisted virtualization and data execution protection must be enabled in the BIOS.

Fix: Restart your computer -> enter BIOS -> enable Intel VT-x (Intel) or AMD-V (AMD) -> save and restart.

Problem 2 - WSL 2 not installed

Error messageWSL 2 installation is incomplete.

Fix: Open PowerShell as Administrator and run:

wsl --update

Problem 3 - Docker Desktop not starting

Fix:

  1. Right-click system tray icon
  2. Click Restart Docker Desktop

If it still does not start, use Docker Desktop's built-in reset option:

Reset pathSettings > Troubleshoot > Reset to factory defaults. This removes local containers and images, so use it only after basic restart steps fail.

Useful Docker Desktop Settings

Open Docker Desktop -> Settings:

SettingLocationWhat to change
MemoryResources -> MemoryIncrease to 4-8 GB for better performance
CPUResources -> CPUIncrease to 2-4 CPUs
Disk image sizeResources -> DiskIncrease if you run many large images
Start on loginGeneralEnable/disable auto-start

Verify Full Installation

Run all these to confirm everything works:

# Check Docker version
docker --version

# Check Docker Compose version (included with Docker Desktop)
docker compose version

# Check Docker system info
docker info

# Run test container
docker run hello-world

# List downloaded images
docker images

# List running containers
docker ps

FAQ

Should I memorize every Docker command?+

No. Memorize the core workflow first: build, run, list, inspect, logs, exec, stop, remove, and clean up. Then learn specialized commands when you need them.

Is Docker only for developers?+

No. Docker is useful for system administrators, infrastructure engineers, DevOps engineers, cloud engineers, support engineers, and learners who want repeatable labs.

What should I do after reading this guide?+

Run the examples, write down what each command changes, rebuild the workflow with Docker Compose, and then add one CI/CD step that builds the image automatically.

Need help applying Docker in a real project?

Work directly with Muhammad Irfan Aslam for Docker, Linux, DevOps, CI/CD, cloud deployment, or infrastructure troubleshooting support.

Hire Me for Support