16 lines
387 B
Docker
16 lines
387 B
Docker
FROM golang:1.22@sha256:86a3c48a61915a8c62c0e1d7594730399caa3feb73655dfe96c7bc17710e96cf AS builder
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum main.go ./
|
|
COPY src src
|
|
RUN go build -o /bin/api ./main.go
|
|
|
|
|
|
FROM debian:stable-slim@sha256:57bd74e95092e6d4c0cdb6e36ca3db5bb828c2f592788734d1a707a4b92e7755
|
|
|
|
COPY --from=builder /bin/api /app/api
|
|
COPY migrations /migrations
|
|
EXPOSE 8080
|
|
CMD ["/app/api"]
|
|
|