lvxianchao / notes

狗屁不通瞎写的博客
https://coderlxc.com
1 stars 0 forks source link

CentOS 7 关闭防火墙以后 Docker 报错 iptables failed #16

Closed lvxianchao closed 2 years ago

lvxianchao commented 2 years ago

CentOS 7 执行 systemctl stop firewalld 以后,Docker 运行容器报错:

Error response from daemon: driver failed programming external connectivity on endpoint nginx (492fe5bacabeff80220a680de0855668f26982f06346cd532048caf70534e58a):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 80 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name.
 (exit status 1))
Error: failed to start containers: nginx
lvxianchao commented 2 years ago

执行 systemctl restart docker 重启 Docker 服务。