Temporary failure in name resolution [Errno -3] wi

2020-05-20 07:41发布

I'm following the docker tutorial and am on the part where I have to build the app using:

docker build -t friendlyhello .

It reaches up to step 4, where after a pause I get this error:

Step 4/7 : RUN pip install -r requirements.txt
 ---> Running in 7f4635a7510a
Collecting Flask (from -r requirements.txt (line 1))

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

I'm not quite sure what this error means and how I can go about solving it.

Thanks for your help!

9条回答
我只想做你的唯一
2楼-- · 2020-05-20 08:15

I just did sudo service docker restart and it worked after. Definitely worth a shot before jumping in to modify your configurations.

查看更多
We Are One
3楼-- · 2020-05-20 08:18

It's silly, but I had a VPN connected when I got this error.

After disconnecting the VPN, PIP started working again.

查看更多
我命由我不由天
4楼-- · 2020-05-20 08:18

I had this problem on Windows 10 Pro and I solved it by right clicking on the docker icon in the tray and choosing "Restart...". It took a few mins and then the network was running fine again.

查看更多
登录 后发表回答