From 50e822227505e7b3855be096ba267d36e6bd6da9 Mon Sep 17 00:00:00 2001 From: GoodiesHQ Date: Tue, 29 Oct 2024 03:10:44 -0700 Subject: [PATCH] added dockerfile --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6008c20 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:1.23.2 as builder +WORKDIR /build +COPY go.mod go.sum ./ +RUN go mod download +COPY cmd config ./ +RUN CGO_ENABLED=0 GOOS=linux go build -o /app/cfdns + +FROM scratch +COPY --from=builder /app/cfdns /app/cfdns +WORKDIR /app +ENTRYPOINT ["/app/cfdns"] \ No newline at end of file