2024-11-18 19:52:26 +00:00
|
|
|
FROM golang:1.23-alpine3.20 as go-builder
|
2022-06-06 16:48:53 +00:00
|
|
|
ENV GOPATH ""
|
|
|
|
|
|
|
|
RUN apk add git
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
ADD go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
ADD ./ .
|
|
|
|
RUN go build -o ./server .
|
|
|
|
|
|
|
|
FROM alpine:3.14
|
|
|
|
|
|
|
|
COPY --from=go-builder /app/server /app/server
|
|
|
|
|
|
|
|
ENTRYPOINT ["/app/server"]
|