build(Dockerfile): 将基础镜像从alpine改为scratch以减小镜像体积
Some checks failed
Build docker and publish / build (20.15.1) (push) Failing after 26s
Some checks failed
Build docker and publish / build (20.15.1) (push) Failing after 26s
This commit is contained in:
parent
68c3afb137
commit
42061e38c0
@ -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
|
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
|
# Final minimal image
|
||||||
FROM alpine:latest
|
FROM scratch
|
||||||
|
|
||||||
# Copy CA certificates and timezone data
|
# Copy CA certificates and timezone data
|
||||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user