From a38643e389db81c8fc412d723fa08e286c5dea2f Mon Sep 17 00:00:00 2001 From: ikuaki1009 <109460768+ikuaki1009@users.noreply.github.com> Date: Sat, 11 Mar 2023 19:41:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20Dockerfile=20=E4=B8=AD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20apt=20=E9=95=9C=E5=83=8F=E6=BA=90=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=20(#18)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修改 Dockerfile 中使用 apt 镜像源的方式 * Delete sources.list --- docker/Dockerfile | 10 ++++------ docker/sources.list | 8 -------- 2 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 docker/sources.list diff --git a/docker/Dockerfile b/docker/Dockerfile index f97c051..4d4257d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,7 @@ FROM debian:stable AS resource -COPY sources.list /etc/apt/sources.list - -RUN apt-get update \ +RUN sed -i "s/deb.debian.org/mirrors.ustc.edu.cn/g" /etc/apt/sources.list \ + && apt-get update \ && apt-get upgrade -y \ && apt-get install -y wget xz-utils dos2unix \ && wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-$(dpkg --print-architecture)-static.tar.xz \ @@ -21,9 +20,8 @@ COPY --from=resource /res/ffmpeg/ffmpeg /usr/bin/ffmpeg COPY --from=resource /res/ffmpeg/ffprobe /usr/bin/ffprobe -COPY sources.list /etc/apt/sources.list - -RUN apt-get update \ +RUN sed -i "s/deb.debian.org/mirrors.ustc.edu.cn/g" /etc/apt/sources.list \ + && apt-get update \ && apt-get upgrade -y \ && apt-get install -y curl wget gnupg git python3-pip fonts-wqy-microhei xfonts-utils chromium fontconfig libxss1 libgl1 \ && apt-get autoremove \ diff --git a/docker/sources.list b/docker/sources.list deleted file mode 100644 index 4c75472..0000000 --- a/docker/sources.list +++ /dev/null @@ -1,8 +0,0 @@ -deb http://mirrors.aliyun.com/debian/ buster main non-free contrib -deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib -deb http://mirrors.aliyun.com/debian-security buster/updates main -deb-src http://mirrors.aliyun.com/debian-security buster/updates main -deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib -deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib -deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib -deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib \ No newline at end of file