1
This commit is contained in:
18
ghproxy/Dockerfile
Normal file
18
ghproxy/Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user