From 1a438f21e5ac61662d7819598e0e918d84992cd4 Mon Sep 17 00:00:00 2001 From: Mayank Pande Date: Wed, 11 Jun 2025 13:26:57 +0530 Subject: [PATCH] chore: fix for high cves --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 57f76faf..859bb6ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM golang:1.23.8-bullseye AS builder -RUN apt update && apt install -y libsystemd-dev + +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 . @@ -8,6 +11,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 ARG VERSION=unknown