现象:
[root@localhost test]# docker run --name postgres1 -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres a96c3271c7decb4b97bd6610fc1b3d83b8a8a24a2de372ed192a29ee767be292 docker: Error response from daemon: driver failed programming external connectivity on endpoint postgres1 (72787968cc5899d97e095efec9934f1a91e29b00f1514667c1694aa56e29ed4b): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5432 -j DNAT --to-destination 172.17.0.2:5432 ! -i docker0: iptables: No chain/target/match by that name. (exit status 1)).
原因:
docker服务启动时定义的自定义链docker由于某种原因被清掉
解决方案:
重启docker即可~
systemctl restart docker