赞
踩
shell> docker start nexus3
Error response from daemon: driver failed programming external connectivity on endpoint nexus3 (a37100872332dd85e4ab6688b97bea3c4fb420c7d4740225a69d1cec700fe757): (iptables failed: iptables --wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.3 --dport 8081 -j ACCEPT: iptables: No chain/target/match by that name.
(exit status 1))
Error: failed to start containers: nexus3
网上查,是网络原因。
结合自身来看,我在 phpstudy 开启了服务器防火墙后,安装的docker。今天在 phpstudy 中禁用了服务器防火墙。禁用服务器防火墙后,才发生的此问题。
phpstudy 带的服务器防火墙是iptable(centos7带的防火墙是firewalld,不要混了),错误提示的也是iptable问题。这就对上了。
重建docker0网络,让docker0网络适应无防火墙的情况。
在宿主机执行下面的命令:
shell> pkill docker
shell> iptables -t nat -F
shell> ifconfig docker0 down
shell> brctl delbr docker0
shell> docker -d
shell> systemctl restart docker 重启docker服务
在 phpstudy 中启用服务器防火墙,什么都不需要动,就好了。
另:如果在未启用防火墙状态下安装的docker,且安装docker后启用防火墙的,也会遇到这个问题。
https://blog.csdn.net/blueyan163/article/details/68928065
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。