dockerfile制作python项目镜像时,pip下载报错
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff279ae1490>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/hypercorn/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff279afd0d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/hypercorn/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff279afd280>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/hypercorn/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff279afd430>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/hypercorn/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff279afd5e0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/hypercorn/
ERROR: Could not find a version that satisfies the requirement hypercorn (from versions: none)
ERROR: No matching distribution found for hypercorn
原因是dns解析错误
sudo vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 114.114.114.114

浙公网安备 33010602011771号