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

1、启动docker时报错:

Error response from daemon: driver failed programming external connectivity on endpoint trojan (d3a667de7338ff818977ec2eda6bd0b21562055cd0077a2b3a41fb1927767b87): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 1443 -j DNAT --to-destination 172.17.0.2:443 ! -i docker0: iptables: No chain/target/match by that name.

2、解决办法:

systemctl stop docker.service
iptables -t nat -F
ifconfig docker0 down
systemctl restart docker.service
docker ps

3、容器随docker服务一起自启动

docker update --restart=always <CONTAINER ID>
systemctl restart docker.service
docker ps

# 方法二:
docker run -dit -p 6379:6379 --restart always redis
点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注