From 34409fe53b606acb08dc7e2ba1e783e29d62cb71 Mon Sep 17 00:00:00 2001 From: Tejas Date: Sun, 19 Nov 2023 16:30:38 +0530 Subject: [PATCH] update dockerfile and gitignore Signed-off-by: Tejas --- .gitignore | 2 +- build/Dockerfile | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index fecc496..4ca7066 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ KUBECONFIG # Built Binary File -kubescape-exporter +prometheus-exporter # Data stored by Grafana data \ No newline at end of file diff --git a/build/Dockerfile b/build/Dockerfile index dd9b3a3..e9ba735 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,7 +1,8 @@ FROM --platform=$BUILDPLATFORM golang:1.20-alpine as builder ENV GO111MODULE=on \ - CGO_ENABLED=0 + CGO_ENABLED=0 \ + GOPROXY=https://proxy.golang.org,direct # Set the working directory inside the container WORKDIR /work @@ -9,12 +10,12 @@ WORKDIR /work RUN --mount=target=. \ --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg \ - GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /out/kubescape-exporter . + GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /out/prometheus-exporter . FROM gcr.io/distroless/static-debian11:nonroot # Copy the Pre-built binary file from the previous stage -COPY --from=builder /out/kubescape-exporter /usr/bin/kubescape-exporter +COPY --from=builder /out/prometheus-exporter /usr/bin/prometheus-exporter # Entry Point -ENTRYPOINT [ "kubescape-exporter" ] \ No newline at end of file +ENTRYPOINT [ "prometheus-exporter" ] \ No newline at end of file