Installation & Setup Guide
Set up Docker Engine and Docker Desktop on Windows, macOS, or Linux.
1. Windows Installation (Docker Desktop + WSL2)
- Ensure WSL2 (Windows Subsystem for Linux 2) is enabled in PowerShell:
wsl --install. - Download Docker Desktop for Windows from the official Docker website.
- Run the installer and check the option Use WSL 2 instead of Hyper-V.
- Restart your machine and launch Docker Desktop.
2. macOS Installation
Download Docker Desktop for Mac (Apple Silicon M1/M2/M3 chip or Intel chip) or install via Homebrew:
brew install --cask docker
3. Linux (Ubuntu / Debian) Installation
Install Docker Engine via official apt repositories on Ubuntu:
# 1. Update package index & install prerequisites sudo apt update sudo apt install -y ca-certificates curl gnupg lsb-release # 2. Add Docker's official GPG key sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg # 3. Set up repository & install Docker Engine echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin # 4. Manage Docker as a non-root user sudo usermod -aG docker $USER
4. Verifying Installation
Run the official Docker hello-world container to verify system setup:
docker --version docker run hello-world
Next Up
Explore Docker Architecture: client-server model, daemon, registry, images, containers, and volumes.
Next Lesson: Docker Architecture & Concepts →