Run Docker on WSL (Windows Subsystem for Linux - Ubuntu)

by Andrés Cuadros Suárez   Last Updated December 28, 2017 13:00 PM

I've tried to run Docker on WSL unsuccessfully. I've installed Docker on WSL following the steps given to install Docker on Ubuntu but when I execute docker ps I get the following error:

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

Watching docker logs I found this:

level=warning msg="Running modprobe nf_nat failed with message: `modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-43-Microsoft/modules.dep.bin'\nmodprobe: WARNING: Module nf_nat not found in directory /lib/modules/4.4.0-43-Microsoft`, error: exit status 1"
time="2017-12-28T12:07:23.227671600+01:00" level=warning msg="Running modprobe xt_conntrack failed with message: `modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-43-Microsoft/modules.dep.bin'\nmodprobe: WARNING: Module xt_conntrack not found in directory /lib/modules/4.4.0-43-Microsoft`, error: exit status 1"
Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.0: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
 (exit status 3)

Any idea how can I run Docker on WSL?



Related Questions


Windows and WSL docker-machine conflict

Updated October 09, 2018 07:00 AM



docker stack network issue

Updated September 11, 2017 12:00 PM