Solve the problem of very slow speed when docker build

RUN sed -i "s/archive.ubuntu./mirrors.aliyun./g" /etc/apt/sources.list 
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\/debian-security/g" /etc/apt/sources.list

 

Replace the corresponding source with the image of Alibaba Cloud.

 

 

RUN sed -i "s/archive.ubuntu./mirrors.ustc.edu.cn/g" /etc/apt/sources.list 
RUN sed -i "s/deb.debian.org/mirrors.ustc.edu.cn/g" /etc/apt/sources.list 
RUN sed -i "s/security.debian.org/mirrors.ustc.edu.cn\/debian-security/g" /etc/apt/sources.list

 

You can also consider replacing it with the mirror image corresponding to the University of Science of China

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326138231&siteId=291194637