我遵循 无花果指南的思想,在 python 应用程序中使用 docker,但是当 docker 到达命令时
RUN pip install -r requirements.txt
I get the following error message:
Step 3 : RUN pip install -r requirements.txt
---> Running in fe0b84217ad1
Collecting blinker==1.3 (from -r requirements.txt (line 1))
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-2, 'Name or service not known'))': /simple/blinker/
这种情况重复了好几次,然后我得到了另一个信息:
Could not find any downloads that satisfy the requirement blinker==1.3 (from -r requirements.txt (line 1))
No distributions at all found for blinker==1.3 (from -r requirements.txt (line 1))
出于某种原因 Pip 无法从码头集装箱内访问任何包裹。我需要做什么才能让它上网吗?
However pip works fine to install things outside of the docker container, and worked fine even with that exact package (blinker==1.3
) so that's not the problem. Also this problem isn't specific to that package. I get the same issue with any pip install
command for any package.
Does anyone have any idea what's going on here?