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