Here’s how to fix that:
Do not install Docker in WSL, you can use Docker on your Windows machine by modifying the path.
In Docker Settings/General, Check “Expose Daemon on tcp:// without TLS”
Execute the following in a Bash terminal. This will make
dockeravailable in your Bash terminal.echo "PATH=\"$PATH:$HOME/bin:$HOME/.local/bin:/mnt/c/Program\ Files/Docker/Docker/resources/bin\"" >> ~/.bashrcecho "alias docker=docker.exe" >> ~/.bashrcecho "alias docker-machine=docker-machine.exe" >> ~/.bashrcecho "alias docker-compose=docker-compose.exe" >> ~/.bashrcecho "export DOCKER_HOST='tcp://localhost:2375'" >> ~/.bashrcsource ~/.bashrcsudo sh -c "echo Defaults env_keep += \"DOCKER_HOST\" >> /etc/sudoers.d/docker"
This will add Docker to your PATH, create aliases for the docker*.exe files and create a sudoers file so you don’t have to pass -E into the command every time you run it.
Let me know if you run into any issues.