Docker | 端口映射错误

环境

# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

# docker -v
Docker version 19.03.2, build 6a30dfc

报错

docker: Error response from daemon: driver failed programming
external connectivity on endpoint portainer
(fe2f65af21d444cd134d3e4ca9b5a658ddf15e12bc2b176511c3aabfa67473):
(iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0
--dport 9000 -j DNAT --to-destination 172.17.0.3:9000 ! -i
docker0: iptables: No chain/target/match by that name.

解决

pkill docker
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
systemctl restart docker

本文链接:

https://blog.zhigu34.cn/archives/430.html
1 + 3 =
快来做第一个评论的人吧~