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

How to Install Docker on WSL2

Complete guide to install Docker Engine on WSL2. Covers Docker CE installation, post-install steps, Docker Compose, and verification.

Luca Berton

Β· AI Advisor & Architect

Published Β· 1 min read

Here is how to install Docker in WSL2 without Docker Desktop in 2026.

Step 1: Install WSL2

wsl --install -d Ubuntu-24.04

Step 2: Install Docker

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
sudo service docker start

Auto-Start Docker

Add to ~/.bashrc:

if service docker status 2>&1 | grep -q "is not running"; then
    sudo service docker start
fi

Verify

docker --version
docker run hello-world

Free 30-min Production AI consultation

Book Now