This commit is contained in:
NewName
2024-12-22 19:26:44 +08:00
parent 5bbf7c744a
commit f76a13f4ee
12 changed files with 1000 additions and 233 deletions

18
ghproxy/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM golang:1.22.5-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
FROM alpine:3.20
WORKDIR /root/
COPY --from=builder /app/main .
COPY --from=builder /app/config.json .
COPY --from=builder /app/public ./public
CMD ["./main"]