Setting up an environment on Windows requires enabling Windows Subsystem for Linux and launch it.
wsl --install
There may be multiple distributions installed. For these exercises we will use the default Ubuntu distribution. To check distributions use:
wsl --list
If Ubuntu is not the default, then use:
wsl --set-default Ubuntu
If docker reports that the service is not started when executing docker commands in Ubuntu, like listing all containers:
sudo docker ps -a
Then, use the following to start the docker service:
sudo systemctl restart snap.docker.dockerd.service