执行docker run -d --name tomcat-test -p 2080:8080 tomcat
报错14e19dc7811296e5dda287164e2573b7502f8112943d2bd228f6e51a84ac4ad6
docker: Error response from daemon: driver failed programming external connectivity on endpoint tomcat-test (d53b35864d0d12d23776b62b6edd5fa3cc9365ae663d71ea48ff29ed6dbf735d): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 2080 -j DNAT --to-destination 172.17.0.2:8080 ! -i docker0: iptables: No chain/target/match by that name.
解决方法:
停止docker进程
systemctl stop docker.service
把nat表 内所有的INPUT/OUTPUT/FORWARD chain 设定的规则都清空
iptables -t nat -F
关闭docker0网卡
ifconfig docker0 down
重新加载docker0
brctl delbr docker0
再次启动docker即可
systmctl start docker