From e6be361c18195f1b5e9e6aad29f28e45623076cc Mon Sep 17 00:00:00 2001 From: Pitos Date: Sat, 12 Apr 2025 03:57:31 +0200 Subject: [PATCH] Add user 1001 and group 1001, otherwise it cannot to execute securitycontext. Without this container is running as root --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 490d878..8020469 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,3 +26,12 @@ RUN apt-get update && \ apt-get autoremove -y && \ apt-mark unhold locales && \ rm -rf /var/lib/apt/lists/* + +RUN groupadd -g 1001 appgroup && \ + useradd -m -u 1001 -g appgroup appuser + +# Ensure proper permissions +RUN chown -R 1001:1001 /opt/bitnami /bitnami /usr/share/doc/pgvector || true + +# Switch to user 1001 +USER 1001 \ No newline at end of file