Files
hubproxy/ghproxy/Dockerfile
NewName f76a13f4ee 1
2024-12-22 19:26:44 +08:00

18 lines
352 B
Docker

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"]