Featured image of post Solve "Cannot connect to the Docker daemon at unix:///var/run/docker.sock." Issue

Solve "Cannot connect to the Docker daemon at unix:///var/run/docker.sock." Issue

After install docker on the Windows 10 WSL on Ubuntu. It shows "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?." message. Let's try to solve it!

Photo by Rubaitul Azad on Unsplash

Issue

After installing docker on the Windows 10 WSL on Ubuntu. We try to start the docker and pull the docker images. But it shows the following messages

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

Solution

A. Restart docker server from system service

systemctl start docker
gpasswd -a $USER docker

B. Manual start docker service

sudo dockerd

The problem is that docker service doesn’t start. So it will show that message. After you restart the docker service and everything will work!

Reference

comments powered by Disqus
All rights reserved,未經允許不得隨意轉載
Built with Hugo
Theme Stack designed by Jimmy