build(Dockerfile): 将基础镜像从alpine改为scratch以减小镜像体积
Some checks failed
Build docker and publish / build (20.15.1) (push) Failing after 26s

This commit is contained in:
shanshanzhong 2025-10-14 08:16:15 -07:00
parent 68c3afb137
commit 42061e38c0

View File

@ -24,7 +24,7 @@ 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 alpine:latest
FROM scratch
# Copy CA certificates and timezone data
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/