From 3f7840188e8fa0c6b6c57ac183f0ecf5847fcfbc Mon Sep 17 00:00:00 2001 From: hkfires <10558748+hkfires@users.noreply.github.com> Date: Sat, 30 Aug 2025 16:41:27 +0800 Subject: [PATCH] Set the default Docker timezone to Asia/Shanghai --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index f869f0fc..087ebfec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,8 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o ./CLIProxyAPI ./cmd/server/ FROM alpine:3.22.0 +RUN apk add --no-cache tzdata + RUN mkdir /CLIProxyAPI COPY --from=builder ./app/CLIProxyAPI /CLIProxyAPI/CLIProxyAPI @@ -20,4 +22,8 @@ WORKDIR /CLIProxyAPI EXPOSE 8317 +ENV TZ=Asia/Shanghai + +RUN cp /usr/share/zoneinfo/${TZ} /etc/localtime && echo "${TZ}" > /etc/timezone + CMD ["./CLIProxyAPI"] \ No newline at end of file