dockerfile 时区更新

This commit is contained in:
wuchao 2024-06-27 14:32:36 +08:00
parent 300b117b90
commit 623d75dde8
1 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,9 @@ COPY /server .
#COPY --from=builder /app/server . #COPY --from=builder /app/server .
COPY .env . 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 #RUN chmod +x /app/server
# 设置环境变量的默认值 # 设置环境变量的默认值
ENV SERVER=api ENV SERVER=api