python官方镜像是基于debian的。国内使用时定制一下,加快下载速度。

1 debian本身使用国内源

dockfile中:

#国内debian源
ADD sources.list /etc/apt/
sources.list在dockerfile同目录下:

deb http://mirrors.ustc.edu.cn/debian/ stretch main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ stretch main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib
deb http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main non-free contrib

2 pip使用国内源

#用国内源加速大包的安装
COPY pip.conf /etc/pip.conf

pip.conf

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple 

dockerfile debian 和pip使用国内源的更多相关文章

  1. pip换国内源

    pip换国内源 1.国内常用源   阿里云 http://mirrors.aliyun.com/pypi/simple/   中国科技大学 https://pypi.mirrors.ustc.edu. ...

  2. linux pip使用国内源

    最近在Linux里面使用pip安装应用的速度十分的慢,于是便上网找了一些国内的源. 清华大学:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:https:// ...

  3. pip使用国内源

    对于Python开发用户来讲,PIP安装软件包是家常便饭.但国外的源下载速度实在太慢,浪费时间.而且经常出现下载后安装出错问题.所以把PIP安装源替换成国内镜像,可以大幅提升下载速度,还可以提高安装成 ...

  4. pip 设置国内源

    最近使用 pip 安装包,动辄十几 k 甚至几 k 的下载速度,确实让人安装的时候心情十分不好.所以还是要给 pip 换一个国内的源.可以显著的提升安装速度.有更多的时间来研究算法. 下面,列一下收集 ...

  5. Python pip配置国内源

    众所周知,Python使用pip方法安装第三方包时,需要从 https://pypi.org/ 资源库中下载,但是会面临下载速度慢,甚至无法下载的尴尬,这时,你就需要知道配置一个国内源有多么重要了,通 ...

  6. pip更改国内源

    国内源: 阿里云 http://mirrors.aliyun.com/pypi/simple/中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/豆瓣(dou ...

  7. pip 设置国内源提高速度

    临时使用: 可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple 例如:pip install -i https://pypi.tuna. ...

  8. pip/pip3国内源

    Error 在使用pip3安装PySide2时出现ReadTimeoutError. $ pip3 install PySide2 Solution 使用国内源 例如: $ pip3 install ...

  9. pip使用国内源的配置方法

    [root@ ~]# cat ~/.pip/pip.conf [global] index-url = https://pypi.douban.com/simple

随机推荐

  1. How to click on a point on an HTML5 canvas in Python selenium webdriver

    https://stackoverflow.com/questions/29624949/how-to-click-on-a-point-on-an-html5-canvas-in-python-se ...

  2. 电影编码JPEG2000与H.264

    电影的第三次革命是数字电影的诞生,数字电影取代了胶片,那么数字电影就一定有其独特的封装(压缩)格式.在网络上,我们经常见到许多视频格式,诸如mp4.mkv.flv.rmvb等,这些都是在通用计算机上播 ...

  3. spring boot log4j2与三方依赖库log4j冲突无法初始化问题解决方法

    因为从Spring Boot 1.4开始,spring boot就不支持log4j了,必须是log4j2或者logback,具体两者如何配置以及NDC的支持可以参考spring boot精华版. 这里 ...

  4. Systen,IO

    private void CreateHtml(string sPath, string txt) { string currPath = @"C:\MyCodeHelper" + ...

  5. linux下部署git服务器

    我这里用的是redhat7.4, 直接开始吧. 环境 服务端: Redhat7.4 + git(version 1.8.3.1) IP:192.168.137.168 客户端: win7 + git ...

  6. mysqldump: Couldn't execute 'SHOW VARIABLES LIKE 'ndbinfo_version'': Native table 'performance_schema'.'session_variables' has the wrong structure (1682)

    centos7.5 导出整个数据库报错 问题: [root@db01 ~]# mysqldump -uroot -pBgx123.com --all-databases --single-transa ...

  7. Python3基础 list + *运算 扩充列表

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  8. 找质数|计蒜客2019蓝桥杯省赛 B 组模拟赛(一)

    找质数 思路:数据大,用线性筛,筛选素数表,最后查表:题目让我们查找相加等于n的两个数,那么我们就枚举1个素数a,在素数表中查找是否存在n-a也是素数. 注意事项:数据大,不宜用输入输出流,cout. ...

  9. StringTie用法详解

    StringTie 参考链接: https://ccb.jhu.edu/software/stringtie/index.shtml?t=manual#input https://www.cnblog ...

  10. [JavaScript] - replaceAll,将字符串中的字母或数字等全部替换掉的方式

    原题 function DNAtoRNA(dna) { // create a function which returns an RNA sequence from the given DNA se ...