I just installed docker
inside by WSL Ubuntu box. However, while trying to start it docker
i get following error:
time="2023-06-23T06:40:32.022375400+04:00" level=info msg="falling back to default port range 49153-65535" error="open /proc/sys/net/ipv4/ip_local_port_range: no such file or directory"
time="2023-06-23T06:40:32.039818100+04:00" level=info msg="unable to detect if iptables supports xlock: 'iptables --wait -L -n': `iptables v1.8.7 (legacy): can't initialize iptables table `filter': Table does not exist (do you need to insmod?)\nPerhaps iptables or your kernel needs to be upgraded.`" error="exit status 3"
time="2023-06-23T06:40:32.313321500+04:00" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby
time="2023-06-23T06:40:32.314254300+04:00" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
time="2023-06-23T06:40:32.314299400+04:00" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
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.7 (legacy): 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)
As suggested on different forums, i tired degrading my ip-tables as below but it didnt work:
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
Also, Though I can sudo
inside WSL but cant start terminal as administrator as suggested here, so looking for another possible solution to this problem?
Ubuntu 22.04.2 LTS