alai-server/backend/Dockerfile

12 lines
300 B
Docker
Raw Normal View History

2022-06-29 21:26:05 -04:00
FROM golang:1.18.3 AS builder
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/ ./...
FROM golang:1.18.3
WORKDIR /usr/local/bin
COPY --from=builder /usr/local/bin/backend .
CMD ["backend", "migrate", "serve"]