From bbea6e59f8fa69d152fc4deab67cd1d76aaf5a29 Mon Sep 17 00:00:00 2001 From: Echo <1711788888@qq.com> Date: Sun, 31 Mar 2024 04:25:09 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BF=AE=E6=94=B9dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3140b4b..ee7fda3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,11 @@ COPY --from=0 /go/src/miniapp/resource ./resource/ COPY --from=0 /go/src/miniapp/docker/config.docker.yaml ./docker/ COPY --from=0 /go/src/miniapp/docker ./ -RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo "Asia/Shanghai" > /etc/timezone +# 添加时区环境变量,亚洲,上海 +ENV TimeZone=Asia/Shanghai +# 使用软连接,并且将时区配置覆盖/etc/timezone +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + EXPOSE 8888 ENTRYPOINT ./server -c docker/config.docker.yaml