加上这三行就可以了
RUN pip install -U pip
RUN pip config set global.index-url http://mirrors.aliyun.com/pypi/simple
RUN pip config set install.trusted-host mirrors.aliyun.com
加上这三行就可以了
RUN pip install -U pip
RUN pip config set global.index-url http://mirrors.aliyun.com/pypi/simple
RUN pip config set install.trusted-host mirrors.aliyun.com
阿里云个人镜像(速度最快,下边是中科大的公共镜像,个人镜像的获取方法见本文最后)
https://ustc-edu-cn.mirror.aliyuncs.com
网易镜像
百度镜像
docker官方国内镜像
https://registry.docker-cn.com
中科大镜像(不要用这个,现在已无法外网访问,仅限学校内网使用)
https://docker.mirrors.ustc.edu.cn
修改/etc/docker/daemon.json(如果没有则新建此文件)
内容如下:
{
"registry-mirrors": ["https://ustc-edu-cn.mirror.aliyuncs.com"]
}
也可以配置多个地址:
{
"registry-mirrors": ["https://ustc-edu-cn.mirror.aliyuncs.com",
"https://hub-mirror.c.163.com"
]
}
docker info