Docker 名称解析暂时失败 [Errno -3] [英] Temporary failure in name resolution [Errno -3] with Docker

查看:29
本文介绍了Docker 名称解析暂时失败 [Errno -3]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注 docker 教程,并且正在我所拥有的部分使用以下方法构建应用程序:

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

docker build -t friendlyhello .

它到达第 4 步,暂停后我收到此错误:

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.

感谢您的帮助!

推荐答案

我刚刚做了 sudo service docker restart 并且它工作了.在开始修改配置之前绝对值得一试.

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

这篇关于Docker 名称解析暂时失败 [Errno -3]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆