docker 報錯 docker: Error response from daemon: driver failed....iptables failed:


現象:

[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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM