Install Docker in WSL2 (Ubuntu) without Docker Desktop

Feb 15, 2022 08:48 · 98 words · 1 minute read

  1. Follow the installation steps for Ubuntu (not the ones for Windows or WSL2!) in the Docker Documentation. The easiest installation method is probably “Install using the repository”.
  2. The sudo docker run hello-world command won’t work yet (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Solution: In a separate terminal session, run sudo dockerd. Then, the command will succeed and you can use Docker like you would on “normal” Linux! 🎉

(via Install Docker on Windows (WSL) without Docker Desktop by Jonathan Bowman on, which is a bit too detailed in my opinion)