Hello All,
I am new to the DevOps world so forgive me if this question has a simple answer!
I am having issues getting docker to work in WSL2. Whenever I start Docker Desktop I get a windows error saying “WSL integration with distro Ubuntu unexpectedly stopped with exit code 1. Do you want to restart it?”. No matter how many times I restart it, I get the same error.
In Ubuntu, if i try to run “Docker run hello-world” i get the error:
“docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?”
When I try to start docker with ‘sudo service docker start’ it tells me it is starting docker, but ‘service docker status’ always shows that it is not running.
If i open a command prompt window in windows, and run the command for getting started “docker run -d -p 80:80 docker/getting-started” i get an error back saying:
“docker: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:80 → 0.0.0.0:0: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.”
^^(after looking into this, this is probably a windows thing and ntoskrnl.exe is using port 80 on my system so this may be a separate issue but including just in case)
When i run the self-diagnose tool within Docker Desktop it tells me : “com.docker.wsl-distro-proxy.exe is not running” and “vpnkit.exe is not running”. Not sure what those do or how to fix that, or if thats even my issue.
Troubleshooting Ive done:
-verified that ‘wsl -l -v’ shows Ubuntu is running WSL version 2
-verified windows build is compatible (build 19042)
-uninstalled docker desktop, rebooted, reinstalled as admin
-verified the settings in docker desktop are using WSL2
-tried to expose daemon on tcp://localhost:2375 in docker-desktop settings
Not sure where to go next, so hoping someone can help.
Thanks so much!