zoukankan      html  css  js  c++  java
  • dockerfile debian 和pip使用国内源

    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 
  • 相关阅读:
    053592
    053591
    053590
    053589
    053588
    053676
    C# WPF Border控件总结
    Android Studio 添加jar或aar依赖的两种方式
    javascript Date与string之间的转换
    C#:使用dsoframer.ocx控件实现内嵌office效果(详解)
  • 原文地址:https://www.cnblogs.com/xuanmanstein/p/10071374.html
Copyright © 2011-2022 走看看