docker 端口映射错误解决 iptables: No chain/target/match by that name.

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012599988/article/details/81670852

这里写图片描述

在docker容器上部署项目后,启动docker容器,出现:

iptables failed:iptables -t nat -A DOCKER -p tcp -d 0/0 –dport 8080 -j DNAT –to-destination 172.17.0.1:80 ! -i docker0: iptables: No chain/target/match by that name.

解决方案:

  1、先看能不能ping通网络。若能依次执行以下命令

  2、pkill docker

  3、iptables -t nat -F

  4、ifconfig docker0 down

  5、brctl delbr docker0

  6、service restart docker 

猜你喜欢

转载自blog.csdn.net/u012599988/article/details/81670852