From 1a10cb30cec1bcb14b919ed65616fca98132518b Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Mon, 26 Jan 2026 15:56:42 +0100 Subject: [PATCH] Add appuser to Dockerfile Change-Id: I5916fec778f41ab20af355482104335e450f35a8 Signed-off-by: garciadeblas --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index af9296a6e..c597f455a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,3 +57,13 @@ RUN curl https://get.datree.io | /bin/bash RUN helm plugin install https://github.com/datreeio/helm-datree +# Creating the user for the app +RUN groupadd -g 1000 appuser && \ + useradd -u 1000 -g 1000 -d /app appuser && \ + mkdir /app && \ + chown -R appuser:appuser /app + +WORKDIR /app + +# Changing the security context +USER appuser:appuser -- 2.25.1