Skip to content

Verify Docker in WSL2

Run the same three commands in WSL2 bash (not PowerShell):

Terminal window
docker --version && docker ps && docker run --rm hello-world

All three must succeed. hello-world on Windows does not prove Docker works in WSL — this check does.

SymptomCauseFix
docker: permission deniedWSL Integration off for your distro, or Docker Desktop not runningEnable your distro under WSL IntegrationApply & restart
docker: command not found in WSLIntegration not enabled, or terminal opened before integrationComplete the enable integration step above (fresh Ubuntu window)
Cannot connect to the Docker daemon in WSLDocker Desktop not runningStart Docker Desktop; wait for whale icon to steady
docker run works but docker ps emptyhello-world used --rmExpected — container removed after exit
lookup docker.internal errorsDocker networking after sleep/hibernationRestart Docker Desktop; if needed: wsl --shutdown in PowerShell, restart Docker, reopen Ubuntu