Dockerfile 指定 pip 安装源

Dockerfile使用的python3.7作为基础镜像 FROM python:3.7,但是执行
RUN pip install --no-cache-dir -r requirements.txt
是默认走了这个源,https://files.pythonhosted.org/packages,编译用时太久。

修改成国内源来加快编译速度:

RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements.txt

相关文章:

  • 2022-12-23
  • 2021-06-11
  • 2021-12-19
  • 2022-12-23
  • 2021-11-02
  • 2022-03-06
  • 2022-12-23
  • 2022-01-23
猜你喜欢
  • 2021-07-22
  • 2021-07-22
  • 2022-12-23
  • 2022-01-24
  • 2021-05-15
  • 2021-08-14
  • 2022-12-23
相关资源
相似解决方案