Dockerfile 换源加速

apt-get 替换sources.list源文件内容 把其改成国内阿里源
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get clean
RUN apt-get update
RUN apt-get install

yum 增加阿里换源
RUN curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
RUN yum makecache 



 

posted @ 2021-04-28 11:33  TY520  阅读(27274)  评论(0)    收藏  举报