Archived post: posted sometime between 2016 and 2022.

Starting with Docker on Ubuntu in WSL 2 without Docker Desktop

These are the steps I use to run Docker without using Docker Desktop.

  1. Ensure you are using WSL 2 by running wsl --list --verbose in PowerShell.
  2. Then from a WSL2 bash shell...
  3. Completely uninstall Docker: https://askubuntu.com/q/935569
  4. Install docker using the repository https://docs.docker.com/engine/install/ubuntu/
  5. Start the daemon sudo service docker start .
  6. Test that docker works sudo docker run hello-world .

Resources

https://stackoverflow.com/a/56051167/1108891

https://docs.docker.com/engine/install/ubuntu/

https://askubuntu.com/a/1021506/500631