增加腾讯云的Debian源
This commit is contained in:
@@ -26,6 +26,8 @@ RUN npm run build \
|
||||
|
||||
FROM docker.m.daocloud.io/library/node:22-bookworm-slim AS runtime
|
||||
|
||||
ARG DEBIAN_MIRROR=mirrors.cloud.tencent.com
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Asia/Shanghai
|
||||
ENV NODE_ENV=production
|
||||
@@ -34,7 +36,9 @@ WORKDIR /app
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt-get update \
|
||||
sed -i "s|http://deb.debian.org/debian|http://${DEBIAN_MIRROR}/debian|g" /etc/apt/sources.list.d/debian.sources \
|
||||
&& sed -i "s|http://security.debian.org/debian-security|http://${DEBIAN_MIRROR}/debian-security|g" /etc/apt/sources.list.d/debian.sources \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
curl ca-certificates tzdata \
|
||||
&& ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime \
|
||||
|
||||
@@ -16,9 +16,12 @@ RUN npm run build
|
||||
|
||||
FROM docker.m.daocloud.io/library/caddy:2-alpine
|
||||
|
||||
ARG ALPINE_MIRROR=mirrors.cloud.tencent.com
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
RUN apk add --no-cache tzdata \
|
||||
RUN sed -i "s|https://dl-cdn.alpinelinux.org/alpine|https://${ALPINE_MIRROR}/alpine|g" /etc/apk/repositories \
|
||||
&& apk add --no-cache tzdata \
|
||||
&& ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime \
|
||||
&& echo ${TZ} > /etc/timezone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user