From aa7d9ce69c36623fa8b699d26d64909086eaf5b5 Mon Sep 17 00:00:00 2001 From: Audun Ytterdal Date: Thu, 21 Dec 2023 13:42:33 +0100 Subject: [PATCH] Adding Dockerfile --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..edf2b9a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM golang:latest as builder +WORKDIR /app +COPY . . +RUN go mod download +RUN CGO_ENABLED=0 GOOS=linux go build -o chaosbackend + +FROM scratch +COPY --from=builder /app/chaosbackend . +ENTRYPOINT ["./chaosbackend --listen 0.0.0.0:8080"] \ No newline at end of file