From b70738b43400e9d0d592763a6344689d58f7c5a3 Mon Sep 17 00:00:00 2001 From: shanshanzhong Date: Tue, 28 Oct 2025 20:59:22 -0700 Subject: [PATCH] =?UTF-8?q?build(Dockerfile):=20=E5=B0=86=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E9=95=9C=E5=83=8F=E4=BB=8Escratch=E6=94=B9=E4=B8=BAal?= =?UTF-8?q?pine=E5=B9=B6=E4=BC=98=E5=8C=96=E6=97=B6=E5=8C=BA=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 简化时区配置,从仅复制上海时区改为复制全部时区数据 移除不必要的/etc目录复制 --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 74d41df..48c10c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,11 +24,11 @@ RUN BUILD_TIME=$(date -u +"%Y-%m-%d %H:%M:%S") && \ go build -ldflags="-s -w -X 'github.com/perfect-panel/server/pkg/constant.Version=${VERSION}' -X 'github.com/perfect-panel/server/pkg/constant.BuildTime=${BUILD_TIME}'" -o /app/ppanel ppanel.go # Final minimal image -FROM scratch +FROM alpine:latest # Copy CA certificates and timezone data COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai +COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo ENV TZ=Asia/Shanghai @@ -36,7 +36,6 @@ ENV TZ=Asia/Shanghai WORKDIR /app COPY --from=builder /app/ppanel /app/ppanel -COPY --from=builder /build/etc /app/etc # Expose the port (optional) EXPOSE 8080