我正在关注 docker 教程,并且我必须使用以下方法构建应用程序:
docker build -t friendlyhello .
它达到了第 4 步,暂停后我收到此错误:
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/
我不太确定这个错误意味着什么以及如何解决它。
谢谢你的帮助!
原文由 monadoboi 发布,翻译遵循 CC BY-SA 4.0 许可协议
我刚刚做了
sudo service docker restart
然后它就起作用了。在开始修改配置之前绝对值得一试。