启动Docker容器报错docker: Error response from daemon: driver failed programming external connectivity on x

docker: Error response from daemon: driver failed programming external connectivity on endpoint jona (3dxxxxxxxxxx52eba0d979be0d4f3e926d2f04634db9e3d3944):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 4000 -j DNAT --to-destination 17x.1x.0.x:4000 ! -i docker0: iptables: No chain/target/match by that name.
 (exit status 1)).
 

原因:
启动Docker后,再对防火墙firewalld进行操作,就会发生上述报错,当 firewalld 启动或者重启时,将会从 iptables 中移除 Docker 的规则,影响 Docker 的正常工作。
解决:
 

systemctl restart docker

记录新手上路docker遇到的问题之一~~共勉

你可能感兴趣的:(服务器,网络,运维)