This commit is contained in:
xuyue committed 2025-03-05 22:29:14 +08:00
commit 53b259b72e
5 files changed
+280

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
FROM golang:1.23-alpine as builder
ARG CGO_ENABLED=0
WORKDIR /app
COPY go.mod go.sum ./
RUN go env -w GO111MODULE=on
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go mod download
COPY main.go ./
RUN go build -o api
FROM scratch
COPY --from=builder /app/api /api
ENTRYPOINT ["/api"]