Skip to main content
πŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy β€” plus the companion book on Leanpub & Amazon. Start Learning
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.

LB
Luca Berton
Β· 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 AI & Cloud consultation

Book Now