Replace apt with Ali source in Dockerfile

When running the Dockerfile command in China, the source of apt has not been modified. It defaults to the official source of Ubuntu. If you pass it directly, it apt-get installwill be very slow or even fail. If you have used Ubuntu’s apt before, you should be very familiar with it

Edit the Dockerfile apt-get installand change the source to Ali source:

RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get update

....
....
....

RUN apt-get install -y xxxxxxx

Guess you like

Origin blog.csdn.net/qq_41129489/article/details/124725858