欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

解决docker: Error response from daemon故障

程序员文章站 2024-03-12 10:26:32
...
[[email protected] /]# docker run -d -p 40000:22 -p 40002:2100 -p 40003:8088 --name yshj-uac-centos --privileged=true yshj-uac /usr/sbin/init
72e99b4daf849e7f6898ff47c590bc8f98522dc96f05a658010987c6a97513d8
docker: Error response from daemon: driver failed programming external connectivity on endpoint yshj-uac-centos (3f8070c14c848e73ce20b9edb5da8b1905ec4e4b922a414b1156204c3086d8a8):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 40003 -j DNAT --to-destination 172.17.0.21:8088 ! -i docker0: iptables: No chain/target/match by that name.
 (exit status 1)).

解决方法:

> pkill docker
> iptables -t nat -F
> ifconfig docker0 down
> brctl delbr docker0
> service docker restart
相关标签: docker