Install Docker on Windows
This guide installs Docker Desktop on Windows 10 / Windows 11.
System Requirements
| Requirement | Minimum |
|---|---|
| OS | Windows 10 64-bit (Build 19041+) or Windows 11 |
| RAM | 4 GB (8 GB recommended) |
| Disk | 20 GB free space |
| CPU | 64-bit processor with hardware virtualization |
| Feature | WSL 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
- Double-click
Docker Desktop Installer.exe - The installer will ask: "Use WSL 2 instead of Hyper-V" - leave it checked (recommended)
- Click OK and wait for installation to finish
- Click Close and restart - your computer will restart
Step 3 - Start Docker Desktop
After restarting:
- Open Docker Desktop from the Start Menu
- Accept the Docker Subscription Service Agreement
- Wait for Docker to fully start - you will see the whale icon in the 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:
- Docker looked for the
hello-worldimage locally and did not find it. - Docker pulled the image from Docker Hub automatically.
- Docker created a container from that image.
- 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
Fix: Restart your computer -> enter BIOS -> enable Intel VT-x (Intel) or AMD-V (AMD) -> save and restart.
Problem 2 - WSL 2 not installed
Fix: Open PowerShell as Administrator and run:
wsl --update
Problem 3 - Docker Desktop not starting
Fix:
- Right-click system tray icon
- Click Restart Docker Desktop
If it still does not start, use Docker Desktop's built-in reset option:
Useful Docker Desktop Settings
Open Docker Desktop -> Settings:
| Setting | Location | What to change |
|---|---|---|
| Memory | Resources -> Memory | Increase to 4-8 GB for better performance |
| CPU | Resources -> CPU | Increase to 2-4 CPUs |
| Disk image size | Resources -> Disk | Increase if you run many large images |
| Start on login | General | Enable/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