问题
通过docker run…运行tomcat失败,提示 iptables failed,具体错误信息如下:
docker: Error response from daemon: driver failed programming
external connectivity on endpoint test_tomcat
(68fb66ef33897a15125bad520543277744c217dd09c01601348cae295bd921a1):
(iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0
–dport 8081 -j DNAT --to-destination 172.17.0.3:8080 ! -i docker0: iptables: No chain/target/match by that name. (exit
status 1)).
解决方法
查看防火墙状态:systemctl status firewalld
开启防火墙:systemctl start firewalld
验证
结论:需要开启防火墙才能使用docker run…??