"Cannot Connect to the Docker Daemon. .. ." When Running Docker on Ubuntu/Wsl

I'm trying to run docker in WSL (Windows 10) using the command sudo service docker start, and it shows:

 Starting Docker: docker

but when I run sudo docker images, it tells me:

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

Any ideas on how I can fix this?

10

1 Answer

It comes from nftables used instead of iptables
I found this solution
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
from these threads:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest