pip install error inside Docker container: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
Trying to install some Python packages with pip inside a Docker container I ran into this issue: # pip3 install pytest Collecting pytest Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7feb52c30630>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’,)’: /simple/pytest/ At first I thought …