Docker Tutorial — Install Docker on macOS & Windows
On macOS and Windows, Docker runs inside a lightweight Linux virtual machine managed by Docker Desktop. You interact with it through the same docker CLI commands.
Install on macOS
Step 1 — Download Docker Desktop
Download from docker.com/products/docker-desktop.
- Apple Silicon (M1/M2/M3): Download the Apple Silicon version
- Intel Mac: Download the Intel version
Step 2 — Install
# Drag Docker.app to Applications folder
# Launch Docker Desktop from Applications
# Follow the setup wizard
Step 3 — Configure Resources
Docker Desktop → Settings → Resources:
- CPUs: 2–4 (depending on your machine)
- Memory: 4–8 GB
- Disk: 32–64 GB
Step 4 — Verify
$ docker version
# Client:
# Version: 24.0.7
# OS/Arch: darwin/arm64
# Server:
# Engine Version: 24.0.7
Install on Windows
Prerequisites
- Windows 10/11 (64-bit)
- WSL2 enabled (recommended) or Hyper-V
Step 1 — Enable WSL2
# Open PowerShell as Administrator
wsl --install
# Restart your computer
Step 2 — Download and Install Docker Desktop
Download from docker.com/products/docker-desktop.
Ensure “Use WSL 2 based engine” is selected during installation.
Step 3 — Verify
$ docker version
$ docker run hello-world
Docker Desktop License
Docker Desktop is free for:
- Personal use
- Education
- Small businesses (fewer than 250 employees AND less than $10M revenue)
- Open source projects
Large organizations need a paid subscription.
Quick Reference
macOS: Download Docker Desktop → drag to Applications → launch
Windows: Enable WSL2 → install Docker Desktop → select WSL2 engine
Verify: docker version && docker run hello-world