Before you can run any containers, you need to install Docker. This tutorial covers every installation option: Docker Desktop for macOS and Windows, and Docker Engine for Linux servers.
Last updated: June 2026. Docker pricing and features change frequently. Always check docker.com/pricing for the latest information.
Docker Desktop vs Docker Engine
There are two main ways to run Docker:
Docker Desktop is a GUI application for macOS and Windows. It includes Docker Engine, Docker CLI, Docker Compose, built-in Kubernetes, and a visual dashboard. It is the easiest way to get started.
Docker Engine is the core runtime. It runs natively on Linux. On macOS and Windows, Docker Desktop runs Docker Engine inside a lightweight virtual machine.
| Docker Desktop | Docker Engine | |
|---|---|---|
| Platform | macOS, Windows | Linux |
| GUI | Yes | No |
| Installation | Simple installer | Package manager |
| Best for | Development on Mac/Windows | Linux servers and CI/CD |
| Price | Free (with conditions) | Free, open source |
Docker Desktop Pricing (2026)
Docker Desktop is free for:
- Personal use
- Small companies: fewer than 250 employees AND less than $10M annual revenue
- Education and open source projects
Docker Desktop requires a paid subscription for companies with 250+ employees OR $10M+ annual revenue:
- Pro: $11/month per user ($9/month billed annually)
- Team: $16/month per user ($15/month billed annually)
- Business: $24/month per user
Docker Engine is always free and open source. Only Docker Desktop requires a subscription for large companies.
Install Docker Desktop on macOS
Requirements: macOS 13 (Ventura) or newer. Apple Silicon (M1/M2/M3/M4) and Intel both supported.
Step 1: Go to docker.com/products/docker-desktop.
Step 2: Download the correct version for your Mac:
- Click Mac with Apple Silicon for M1/M2/M3/M4 Macs
- Click Mac with Intel chip for older Intel Macs
Not sure which chip you have? Click the Apple menu → About This Mac.
Step 3: Open the downloaded .dmg file. Drag Docker to your Applications folder.
Step 4: Open Docker from Applications. Follow the setup prompts.
Step 5: Docker Desktop starts and shows a whale icon in your menu bar. When the icon stops animating, Docker is ready.
Step 6: Verify the installation:
docker version
You should see output like:
Client: Docker Engine - Community
Version: 29.x.x
...
Server: Docker Desktop
Engine:
Version: 29.x.x
Step 7: Run your first container:
docker run hello-world
If you see “Hello from Docker!” — it works.
Install Docker Desktop on Windows
Requirements: Windows 10 64-bit (version 22H2 or newer) or Windows 11. WSL2 backend is recommended (Hyper-V is also supported as an alternative).
Step 1: Enable WSL2 (Windows Subsystem for Linux). Open PowerShell as Administrator:
wsl --install
Restart your computer after this completes.
Step 2: Go to docker.com/products/docker-desktop and download Docker Desktop for Windows.
Step 3: Run the installer. Make sure “Use WSL 2 instead of Hyper-V” is checked during installation.
Step 4: Start Docker Desktop from the Start menu. Accept the service agreement.
Step 5: Verify in PowerShell or Windows Terminal:
docker version
docker run hello-world
Install Docker Engine on Linux (Ubuntu/Debian)
On Linux servers and desktops, you install Docker Engine directly — no GUI needed.
Step 1: Remove any old Docker versions:
sudo apt remove docker docker-engine docker.io containerd runc
Step 2: Set up the Docker repository:
# Install required packages
sudo apt update
sudo apt install -y ca-certificates curl gnupg
# Add Docker's official GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add the Docker repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Step 3: Install Docker Engine:
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io \
docker-buildx-plugin docker-compose-plugin
Step 4: Start and enable Docker:
sudo systemctl start docker
sudo systemctl enable docker
Step 5: Add your user to the docker group (so you don’t need sudo for every command):
sudo usermod -aG docker $USER
Log out and log back in for this to take effect.
Step 6: Verify:
docker version
docker run hello-world
Docker Desktop Alternatives for macOS/Linux
If you are a power user or don’t want Docker Desktop, there are two popular alternatives:
OrbStack — faster startup than Docker Desktop, lower memory usage, and runs natively on Apple Silicon. Free for personal use. Great for developers who want speed.
Colima — free, CLI-only, open source. Uses Lima VM to run Docker Engine on macOS. Good for developers who prefer the terminal and want zero cost.
Both tools are Docker-compatible. The same docker commands work.
VS Code Docker Extension
If you use VS Code, install the Docker extension (by Microsoft). It adds:
- A Docker panel to view containers, images, and volumes
- Right-click to stop, restart, or open a terminal in a container
- Syntax highlighting for Dockerfiles
- Integration with Docker Compose
Install it from the Extensions marketplace: search for “Docker” by Microsoft.
Setting Resource Limits in Docker Desktop
By default, Docker Desktop uses up to 8 CPU cores and 8 GB of RAM. You can adjust this:
- Open Docker Desktop
- Go to Settings → Resources
- Adjust CPU, Memory, and Disk image size sliders
- Click Apply & restart
A good default for most developers: 4 CPU cores, 4 GB RAM.
Common Mistakes
Forgetting to start Docker Desktop
On macOS and Windows, Docker Engine only runs when Docker Desktop is running. If you open a terminal and get Cannot connect to the Docker daemon, open Docker Desktop first and wait for it to be ready.
Installing on Linux with sudo and then running as regular user
If you install Docker Engine on Linux and then run docker run hello-world without sudo, you get a permission error. The fix is to add your user to the docker group (Step 5 above) and log out/in again.
Not enabling WSL2 on Windows
Docker Desktop for Windows works best with WSL2. While Hyper-V is also supported, WSL2 gives better performance and is the recommended backend. Run wsl --install before installing Docker Desktop for the smoothest experience.
What’s Next?
You have Docker installed and running. Now let’s understand the two core concepts — images and containers.
Next: Docker Tutorial #3: Docker Images and Containers Explained