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
 posted on 2020-08-08 14:52  Rannie`  阅读(5399)  评论(0编辑  收藏  举报
去除动画
找回动画