Docker容器启动报WARNING: IPv4 forwarding is disabled.bridge-nf-call-iptable...
centos 7 Docker容器启动报WARNING: IPv4 forwarding is disabled. Networking will not work
问题:如题
,启动成功,运行命令
docker info报错:
IPv4 forwarding is disabled
WARN:docker bridge-nf-call-iptables is disabled,
WARN:docker bridge-nf-call-ip6tables is disabled
解决办法:
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-arptables = 1
另外还可以通过run时加-p 参数指定IP的方式来解决,比如 -p 0.0.0.0:999:999(指定ip就按ipv4来,否则默认全部是ipv6的。)