update dockerfile

This commit is contained in:
kiwiidb
2023-09-22 11:08:59 +02:00
parent 6abe2df985
commit 690ee17c51

View File

@@ -12,12 +12,18 @@ RUN go mod download
COPY . .
# Build the application
RUN go build -o main
RUN go build -o main ./cmd/server
# Build the utility scripts
RUN go build -o main ./cmd/invoice-republishing
RUN go build -o main ./cmd/payment-reconciliation
# Start a new, final image to reduce size.
FROM alpine as final
# Copy the binaries and entrypoint from the builder image.
COPY --from=builder /build/main /bin/
COPY --from=builder /build/invoice-republishing /bin/
COPY --from=builder /build/payment-reconciliation /bin/
ENTRYPOINT [ "/bin/main" ]