启动Docker容器报错docker: Error response from daemon: driver failed programming external connectivity on..
Linux系统在启动Docker容器时,出现报错docker: Error response from daemon: driver failed programming external connectivity on endpoint lucid_banach(端口映射或启动容器时报错): (iptables failed: iptables --wait -t nat -A DOCKER -
问题描述
Linux系统在启动Docker容器时,出现报错docker: Error response from daemon: driver failed programming external connectivity on endpoint lucid_banach(端口映射或启动容器时报错): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.2:8080 ! -i docker0: iptables: No chain/target/match by that name).
(exit status 1)).
docker: Error response from daemon: driver failed programming external connectivity on endpoint lucid_banach(端口映射或启动容器时报错): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.2:8080 ! -i docker0: iptables: No chain/target/match by that name).
(exit status 1)).
原因分析:
启动Docker后,再对防火墙firewalld进行操作,就会发生上述报错,当 firewalld 启动或者重启时,将会从 iptables 中移除 Docker 的规则,影响 Docker 的正常工作。
解决方案:
root用户输入指令 :
systemctl restart docker
重启docker服务即可重新生成自定义链DOCKER。
更详细的解释请参考如下链接,本文仅作为快速解决方案,仅供参考。
Linux中启动Docker容器报错:Error response from daemon: driver failed programming external connectivity
更多推荐
所有评论(0)