alai-server/backend/Dockerfile

13 lines
325 B
Docker
Raw Normal View History

2023-01-27 22:52:05 -03:00
FROM golang:1.19.5 AS builder
2022-06-29 21:26:05 -04:00
WORKDIR /usr/src/app
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN go build -buildvcs=false -v -o /usr/local/bin/ ./...
2023-01-27 22:52:05 -03:00
FROM golang:1.19.5
2022-06-29 21:26:05 -04:00
WORKDIR /usr/local/bin
COPY --from=builder /usr/local/bin/backend .
2022-07-22 22:17:57 -04:00
COPY .env /usr/local/bin
2022-06-29 21:26:05 -04:00
CMD ["backend", "migrate", "serve"]