gocli/Dockerfile
2024-02-13 18:00:35 +03:30

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