From d4e025f1066383d158e5c5a23669fca62b3f6af1 Mon Sep 17 00:00:00 2001 From: Mayank Pande Date: Wed, 11 Jun 2025 15:41:44 +0530 Subject: [PATCH] chore: fix for high cves --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 859bb6ff..3fec688d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ -FROM golang:1.23.8-bullseye AS builder +FROM golang:1.23.10-bullseye AS builder RUN apt-get update \ && apt-get install -y --no-install-recommends libsystemd-dev \ && rm -rf /var/lib/apt/lists/* + WORKDIR /tmp/src COPY go.mod . COPY go.sum . @@ -11,13 +12,10 @@ COPY . . ARG VERSION=unknown RUN CGO_ENABLED=1 go build -mod=readonly -ldflags "-extldflags='-Wl,-z,lazy' -X 'github.com/coroot/coroot-node-agent/flags.Version=${VERSION}'" -o coroot-node-agent . -RUN apt-get purge -y python3 python3-pip python3-setuptools python3-urllib3 \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -FROM registry.access.redhat.com/ubi9/ubi +FROM registry.access.redhat.com/ubi9/ubi-minimal AS runtime ARG VERSION=unknown COPY --from=builder /tmp/src/coroot-node-agent /usr/bin/coroot-node-agent + ENTRYPOINT ["coroot-node-agent"] \ No newline at end of file