WSL - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

In my case it appears that WSL Integration was turned on in the “General” settings, but not enabled for my specific WSL distro. After enabling integration with additional distros, I was back up and running.

2 Likes

Had the same issue and this solved it

Solved my problem. It was unchecked after a upgrade of Docker Desktop and a reboot of my machine.
Thanks


why i dont see this option?

i try to do but it didint work

The message shows you exactéy why. Run

wsl --list --verbose

You should see at least one WSL distribution in addition to docker-desktop and docker-desktop-data and the version numbers should all be 2, not 1.

If you don’t have a WSL distribution, you have to install one from the store. Since you shared your issue in this topic about accessing the docker socket, I guess you have a distribution, but not a WSL2 distro.

The solution you quoted was not for Docker Desktop.

I fix that problem
i do these steps:
In my opinion, the main problem here is the way we install Ubuntu. Now let me tell you what happened to me. I had one Ubuntu account, so I did “docker login” and “sudo docker server start”, but when I did “docker server status”, the servers still appeared offline, so I fixed the problem. For this, I installed Ubuntu via Powershell and thus I had 2 Ubuntu accounts. After that, I tried the same codes again using “my account that I opened from Powershell” and the problem was solved. I hope also if these do not work, “wsl --update” You can also try the command I hope this info solve yours problems have a nice day!