Skip to main content
πŸ“¬ Get weekly Production AI insights Practical notes on Kubernetes, AI infrastructure and platform engineering. No spam. Subscribe free
Install Docker on Windows with WSL2
DevOps

Install Docker on Windows with WSL2 (Step-by-Step 2026)

Step-by-step guide to install Docker on Windows WSL2. Copy-paste commands, verify installation, and configure for production.

LB
Luca Berton
Β· 1 min read

Here is how to install Docker on Windows using WSL2 in 2026. Tested and verified.

Option 1: Docker Desktop (GUI)

  1. Download Docker Desktop from https://www.docker.com/products/docker-desktop/
  2. Run the installer β€” ensure β€œUse WSL 2 instead of Hyper-V” is checked
  3. Restart your computer
# Verify in PowerShell
docker --version
docker run hello-world

Option 2: Docker Engine Inside WSL2 (No Desktop)

# Inside WSL2 Ubuntu
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg

# Add Docker repository
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
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

# Install
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

# Start Docker (WSL2 doesn't use systemd by default)
sudo service docker start

# Add user to docker group
sudo usermod -aG docker $USER

Free 30-min Production AI consultation

Book Now