docker: Error response from daemon: driver failed programming external connectivity on endpoint jolly_shockley

时间:2022-04-18 07:00:22

1. docker 启动image错误

docker: Error response from daemon: driver failed programming external connectivity on endpoint jolly_shockley (957a1271cd0ae4f9f28163b7cdf5c17d6110fcd6ccd2ca79f2cf0ab8c67dfd52): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3306 -j DNAT --to-destination 172.17.0.2:3306 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)).

原因: docker服务启动时定义的自定义链DOCKER由于某种原因被清掉

解决方法:

重启docker服务及可重新生成自定义链DOCKER

systemctl restart docker