Docker常见错误汇总

问题一:docker pull 镜像名称报错

错误原因

错误信息:Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout

错误信息:Get https://registry-1.docker.io/v2/library/rabbitmq/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Frabbitmq%3Apull&service=registry.docker.io: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

解决方法

网络问题,需要多次尝试下载。


问题二: docker start 容器名称报错

错误信息:

Error response from daemon: driver failed programming external connectivity on endpoint postgres (896b8b00e0278028cd7cbe3034429b9bd06a84be600da604fa6d759e48681132): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5432 -j DNAT --to-destination 172.17.0.4:5432 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1))
Error: failed to start containers: postgres

错误原因:

docker服务启动时定义的自定义链,会形成iptables访问规则,然后由于某种原因规则被清掉

解决方法:

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

systemctl restart docker

你可能感兴趣的:(Docker,docker)