From 845a288ef7faf5aa96ed9ad26b190b452935c2ab Mon Sep 17 00:00:00 2001 From: kiwiidb Date: Thu, 27 Jul 2023 15:36:39 +0200 Subject: [PATCH] add reconciliation build workflow --- reconciliation.Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 reconciliation.Dockerfile diff --git a/reconciliation.Dockerfile b/reconciliation.Dockerfile new file mode 100644 index 00000000..0888b7c2 --- /dev/null +++ b/reconciliation.Dockerfile @@ -0,0 +1,24 @@ +FROM golang:1.20-alpine as builder + +# Move to working directory /build +WORKDIR /build + +# Copy and download dependency using go mod +COPY go.mod . +COPY go.sum . +RUN go mod download + +# Copy the code into the container +COPY . . + +# Build the application +WORKDIR /build/reconciliation_lost_invoices +RUN go build -o main + +# 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/reconciliation_lost_invoices/main /bin/ + +ENTRYPOINT [ "/bin/main" ]