Dockerfile中添加apt换国内源 (#7)

This commit is contained in:
2023-03-07 12:19:52 +08:00 committed by GitHub
parent d459e853d3
commit ca9fcad672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -1,12 +1,14 @@
FROM debian:stable AS resource
COPY sources.list /etc/apt/sources.list
RUN 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 \
&& mkdir -p /res/ffmpeg \
&& tar -xvf ./ffmpeg-git-$(dpkg --print-architecture)-static.tar.xz -C /res/ffmpeg --strip-components 1
COPY docker-entrypoint.sh /res/entrypoint.sh
RUN dos2unix /res/entrypoint.sh \
@ -19,6 +21,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 \
&& apt-get upgrade -y \
&& apt-get install -y curl wget gnupg git python3-pip fonts-wqy-microhei xfonts-utils chromium fontconfig libxss1 libgl1 \

8
docker/sources.list Normal file
View File

@ -0,0 +1,8 @@
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