@[TOC](Docker启动nginx报错Error response from daemon: driver failed programming external connectivity on endpoint nginx (6307a83f775bf316440e9b843841d808a84dded1b805b204484e41a73835f24a): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 80 -j DNAT --to-destination 172.17.0.6:80 ! -i docker0: iptables: No chain/target/match by that name.解决方案)

问题背景

在使用docker进行启动nginx的时候报错

[root@localhost conf.d]# docker start nginx 
Error response from daemon: driver failed programming external connectivity on endpoint nginx (6307a83f775bf316440e9b843841d808a84dded1b805b204484e41a73835f24a):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 80 -j DNAT --to-destination 172.17.0.6:80 ! -i docker0: iptables: No chain/target/match by that name.

解决方案

1 因为在启动docker的nginx之前,使用了关闭防火墙,导致链接出错了,可以重启一下docker重新建立链接

systemctl restart docker

再启动nginx

docker start nginx

总结

遇到两三次这个问题,蓝瘦




作为程序员第 204 篇文章,每次写一句歌词记录一下,看看人生有几首歌的时间,wahahaha …

Lyric: 把她忘记

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐