build: apt 使用阿里云镜像,加速国内网络下的镜像构建
This commit is contained in:
parent
e7ec875a32
commit
aa63d6e28a
|
|
@ -16,8 +16,10 @@ WORKDIR /app
|
||||||
# so it stays cached unless this block itself changes.
|
# so it stays cached unless this block itself changes.
|
||||||
# apt caches are BuildKit cache mounts: even when this layer is invalidated,
|
# apt caches are BuildKit cache mounts: even when this layer is invalidated,
|
||||||
# package downloads are reused instead of hitting deb.debian.org again.
|
# package downloads are reused instead of hitting deb.debian.org again.
|
||||||
|
# deb.debian.org is slow from CN networks, so point apt at a local mirror first.
|
||||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||||
|
sed -i 's|deb\.debian\.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y --no-install-recommends ffmpeg aria2 curl tini gosu ca-certificates unzip \
|
apt-get install -y --no-install-recommends ffmpeg aria2 curl tini gosu ca-certificates unzip \
|
||||||
chromium libnss3 libfreetype6 libharfbuzz0b fonts-freefont-ttf && \
|
chromium libnss3 libfreetype6 libharfbuzz0b fonts-freefont-ttf && \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue