Follow the instructions here
sudo service docker start
See if the Docker daemon is running:
sudo docker ps
If you get an error about not being able to connect to the Docker socket check the logs at /var/logs/docker.log
.
You can confirm that the service is in fact down with service docker status
.
If you see something about iptables
you'll want to edit /etc/init.d/docker
.
Look for the line with DOCKER_OPTS=
and edit it to read
DOCKER_OPTS="--iptables=false"
Restart the service with sudo service docker start
and confirm it's running with service docker status
.
Note that this is obviously not the most secure approach but for development environments it should be fine.
Alternative method: https://nickjanetakis.com/blog/install-docker-in-wsl-2-without-docker-desktop