From 623d75dde8ac80937859330a740717fcc32b9ccb Mon Sep 17 00:00:00 2001 From: wuchao <1272174216@qq.com> Date: Thu, 27 Jun 2024 14:32:36 +0800 Subject: [PATCH] =?UTF-8?q?dockerfile=20=E6=97=B6=E5=8C=BA=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7e645b6..cd610a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,9 @@ COPY /server . #COPY --from=builder /app/server . COPY .env . #设置时区 -ENV TZ Asia/Shanghai +ENV TimeZone=Asia/Shanghai +# 使用软连接,并且将时区配置覆盖/etc/timezone +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone #RUN chmod +x /app/server # 设置环境变量的默认值 ENV SERVER=api