赞
踩
原文地址
win11 安装Ubuntu 222.04LST 。WSL2-Debian启动docker报错(failed to start daemon: Error initializing network controller: error obtaining…)
Tips:sudo service docker start 启动日志在/var/log/docaker.log。
$ cat /var/log/docker.log
...
Sep 13 20:47:37 xxx dockerd: failed to start daemon: Error initializing network controller: error
obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N D
OCKER: iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to ins
mod?)
可以看到是 iptables 的问题,此问题在其 github 仓库中有人提出过#1105,幸运的是,这个问题正好能被简单地解决。
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf`
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。