From 50050300993761cb9ffb6fcff9547c40be2146f1 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 25 Jul 2023 12:48:46 +0100 Subject: [PATCH] Complete and test Dockerfile --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8a2f3bc..ecbf030 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1,8 @@ -FROM go:latest \ No newline at end of file +FROM golang:alpine as builder +WORKDIR /source +COPY ./src . +RUN go build . + +FROM scratch +COPY --from=builder /source/mq-client /bin/mq-client +CMD [ "/bin/mq-client" ] \ No newline at end of file