Installing and Managing Development ToolsLesson 4.4
How to install Docker Desktop and use it with WSL2
Docker Desktop WSL2 backend, enabling WSL2 integration per distro, docker run hello-world, docker without sudo, docker compose, common permission issue fix
Docker Desktop with WSL2
Docker Desktop uses WSL2 as its engine on Windows, replacing the older Hyper-V backend. Containers run directly in the Linux kernel with better performance and no extra VM overhead.
Setup steps
Download and install Docker Desktop for Windows from docker.com. During install, ensure Use the WSL 2 based engine is checked. After install, open Docker Desktop, go to Settings, Resources, WSL Integration, and enable the toggle for your Ubuntu distro.
Verify from WSL2
docker run hello-world
docker --version
docker compose versionFix: running docker without sudo
sudo usermod -aG docker $USER
wsl --shutdown # run in PowerShell
# Reopen WSL2 terminal then:
docker psBasic usage
docker pull node:20-alpine
docker ps -a
docker compose up