24 lines
276 B
Docker
24 lines
276 B
Docker
FROM golang:1.22.0-alpine AS builder
|
|
|
|
RUN apk add --no-cache make
|
|
|
|
WORKDIR /src
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN make build
|
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /src/build/main main
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ["/app/main", "serve", ":8080"]
|