docker构建换源apt-get换源pip换源

 

macOS docker for desktop 换源

 

docker构建换源apt-get换源pip换源

 

 

 

{
  "debug": true,
  "experimental": false,
  "registry-mirrors": [
    "https://docker.mirrors.ustc.edu.cn",
    "https://hub-mirror.c.163.com"
  ]
}

 

apt-get换源

RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN sed -i s@/security.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list

 

pip换源

新建pip.conf

[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com

在构建文件中

COPY ./pip.conf /root/.pip/pip.conf

 

上一篇:MAVEN的安装与使用


下一篇:flutter环境搭建