21 lines
382 B
Text
21 lines
382 B
Text
|
|
FROM golang:1.27.1-alpine AS builder
|
||
|
|
|
||
|
|
WORKDIR /src
|
||
|
|
|
||
|
|
COPY go.mod go.sum ./
|
||
|
|
RUN go mod download
|
||
|
|
|
||
|
|
COPY cmd/ /src/cmd/
|
||
|
|
COPY internal/ /src/internal/
|
||
|
|
COPY web/ /src/web/
|
||
|
|
COPY internal/migration/ /src/internal/migration/
|
||
|
|
|
||
|
|
RUN go build -o /out/go-mad ./cmd/go-mad
|
||
|
|
|
||
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
||
|
|
|
||
|
|
COPY --from=builder /out/go-mad /go-mad
|
||
|
|
|
||
|
|
EXPOSE 8080
|
||
|
|
|
||
|
|
ENTRYPOINT ["/go-mad"]
|