Files
old-backend/Dockerfile
2023-11-14 10:24:25 +01:00

24 lines
444 B
Docker

# Builder image
FROM --platform=linux/amd64 golang:1.21 as builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -mod=readonly -v -o pactual-backend main.go
# Runtime image
FROM --platform=linux/amd64 golang:1.21
WORKDIR /app
# Copy the binary from the builder stage
COPY --from=builder /src/pactual-backend .
# Copy the app/views/qor folder
COPY app/views/qor /app/views/qor
CMD ["/app/pactual-backend"]