This commit is contained in:
2026-01-13 15:18:30 +08:00
parent c87caca88a
commit fdc5a9151f
7 changed files with 52 additions and 5 deletions

View File

@@ -19,9 +19,10 @@ COPY app/main/api/static /app/static
RUN go build -ldflags="-s -w" -o /app/main app/main/api/main.go
FROM scratch
FROM alpine:latest
RUN apk add --no-cache ca-certificates tzdata netcat-openbsd
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
ENV TZ Asia/Shanghai
@@ -30,4 +31,5 @@ COPY --from=builder /app/main /app/main
COPY --from=builder /app/etc /app/etc
COPY --from=builder /app/static /app/static
CMD ["./main", "-f", "etc/main.yaml"]
ENTRYPOINT ["./main"]
CMD ["-f", "etc/main.yaml"]