当前位置: 代码迷 >> 综合 >> docker Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /s
  详细解决方案

docker Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /s

热度:118   发布时间:2023-11-03 22:36:43.0

安装好docker, 再构建一个docker镜像是出现以下错误:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f3238e4c370>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flask/

1.清理所有iptables 规则

sudo iptables -t filter -F
sudo iptables -t filter -X

2.重启docker服务:

systemctl restart docker
  相关解决方案