DEV Community

Discussion on: Install Docker on Windows (WSL) without Docker Desktop

Collapse
kushakjafry profile image
Kushak Zohaad Jafry

Hi, followed everything but on doing sudo dockered getting this error.

WARN[2021-10-24T16:24:00.993150800+05:30] grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock 0 }. Err :connection error: desc = "transport: Error while dialing dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting... module=grpc
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.8.4 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgrade

Collapse
ajburley profile image
ajburley

I got this so I just added "iptables": false to my daemon.json and this error was averted. In the original post it says you only need to do this for Debian but not Ubuntu, and I'm using Ubuntu so I skipped that step originally. But in the end, turned out it was required.

Collapse
kushakjafry profile image
Kushak Zohaad Jafry • Edited on

I did that but it did not work for me. Now I have started using docker desktop again.

Collapse
badsamaritan profile image
Michał Drzymała

What helped me in similar situation:

  • Add iptables false (as mentioned in the article),
  • Restart WSL engine (restart Lxssmanager service on Windows host),
  • Run WSL prompt as Admin (elevated) and there only run dockerd