统一时间格式和时区
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
ARG NODE_BUILDER_IMAGE=docker.m.daocloud.io/library/node:22-alpine
|
||||
ARG CADDY_BASE_IMAGE=docker.m.daocloud.io/library/caddy:2-alpine
|
||||
ARG NPM_REGISTRY=https://registry.npmmirror.com
|
||||
ARG ALPINE_MIRROR=https://mirrors.aliyun.com/alpine
|
||||
|
||||
FROM ${NODE_BUILDER_IMAGE} AS frontend-builder
|
||||
|
||||
@@ -18,6 +19,13 @@ RUN npm run build
|
||||
|
||||
FROM ${CADDY_BASE_IMAGE}
|
||||
|
||||
ARG ALPINE_MIRROR
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN sed -i "s|https://dl-cdn.alpinelinux.org/alpine|${ALPINE_MIRROR}|g; s|http://dl-cdn.alpinelinux.org/alpine|${ALPINE_MIRROR}|g" /etc/apk/repositories \
|
||||
&& apk --no-cache add tzdata \
|
||||
&& ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime \
|
||||
&& echo "${TZ}" >/etc/timezone
|
||||
|
||||
COPY Caddyfile /etc/caddy/Caddyfile
|
||||
COPY --from=frontend-builder /app/frontend/dist /usr/share/caddy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user