更新依赖,开启Green Tea GC新特性

This commit is contained in:
user123456
2025-08-29 22:12:00 +08:00
parent e2413fc30d
commit 9d5d3012a5
7 changed files with 53 additions and 66 deletions

View File

@@ -1,11 +1,14 @@
FROM golang:1.24-alpine AS builder
FROM golang:1.25-alpine AS builder
ARG TARGETARCH
WORKDIR /app
COPY src/go.mod src/go.sum ./
RUN go mod download
COPY src/ .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -trimpath -o hubproxy .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GOEXPERIMENT=greenteagc go build -ldflags="-s -w" -trimpath -o hubproxy .
FROM alpine
@@ -14,4 +17,4 @@ WORKDIR /root/
COPY --from=builder /app/hubproxy .
COPY --from=builder /app/config.toml .
CMD ["./hubproxy"]
CMD ["./hubproxy"]