From e701436a6fe5c9917a42c136c4c004942fa8fd90 Mon Sep 17 00:00:00 2001 From: JulioSCX Date: Mon, 29 Jul 2024 14:20:48 +0100 Subject: [PATCH] docker changes test --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 953f3a1f062..002c9a4aecd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ FROM cgr.dev/chainguard/go@sha256:74bc9af1d45fd1c8d432a89148c5e413711204636b54ca05197b511bea7a18fb as build_env -RUN useradd -m -s /bin/bash testuser -RUN chmod 777 /e2e +RUN adduser -u 1000 -h home/kics -s bin/bash -D kics # Copy the source from the current directory to the Working Directory inside the container WORKDIR /app @@ -29,7 +28,9 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build \ -a -installsuffix cgo \ -o bin/kics cmd/console/main.go -USER testuser + +RUN chown -hR kics /app/ +USER kics # Runtime image # Ignore no User Cmd since KICS container is stopped afer scan