docker -d执行错误
WARN[0000] Running modprobe bridge nf_nat failed with message: install /sbin/modprobe --ignore-install bridge && /sbin/sysctl -q -w net.bridge.bridge-nf-call-arptables=0 net.bridge.bridge-nf-call-iptables=0 net.bridge.bridge-nf-call-ip6tables=0
, error: exit status 1
FATA[0000] Error starting daemon: Error initializing network controller: Error creating default "bridge" network: Failed to Setup IP tables: Unable to enable NAT rule: Iptables not found
原因:iptables丢失nat表
解决:
sudo chmod +x /sbin/iptables
sudo iptables -t net -L
iptables v1.4.21: can't initialize iptables table `net': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
yum upgrade device-mapper-libs -y
sudo iptables -t nat -F
sudo ifconfig docker0 down
sudo brctl delbr docker0
sudo docker -d
ok