From ab18396e890f5f6eff6205de036ad364c8597c7f Mon Sep 17 00:00:00 2001 From: Florian du Garage Num Date: Tue, 30 Sep 2025 21:47:30 +0200 Subject: [PATCH] remove hard-coded uid 1000 --- tutornotes/patches/k8s-deployments | 4 ++-- tutornotes/patches/local-docker-compose-permissions-command | 2 +- tutornotes/templates/notes/build/notes/Dockerfile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tutornotes/patches/k8s-deployments b/tutornotes/patches/k8s-deployments index bfb7d62..982d9e8 100644 --- a/tutornotes/patches/k8s-deployments +++ b/tutornotes/patches/k8s-deployments @@ -15,8 +15,8 @@ spec: app.kubernetes.io/name: notes spec: securityContext: - runAsUser: 1000 - runAsGroup: 1000 + runAsUser: {{ APP_USER_ID }} + runAsGroup: {{ APP_USER_ID }} containers: - name: notes image: {{ NOTES_DOCKER_IMAGE }} diff --git a/tutornotes/patches/local-docker-compose-permissions-command b/tutornotes/patches/local-docker-compose-permissions-command index cd2f8bc..dc4bc03 100644 --- a/tutornotes/patches/local-docker-compose-permissions-command +++ b/tutornotes/patches/local-docker-compose-permissions-command @@ -1 +1 @@ -setowner 1000 /mounts/notes +setowner {{ APP_USER_ID }} /mounts/notes diff --git a/tutornotes/templates/notes/build/notes/Dockerfile b/tutornotes/templates/notes/build/notes/Dockerfile index 34752a2..d2d657f 100644 --- a/tutornotes/templates/notes/build/notes/Dockerfile +++ b/tutornotes/templates/notes/build/notes/Dockerfile @@ -21,7 +21,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ RUN ln -s /usr/bin/python3 /usr/bin/python ###### Git-clone Notes repo ###### -ARG APP_USER_ID=1000 +ARG APP_USER_ID={{ HOST_USER_ID }} RUN useradd --home-dir /app --create-home --shell /bin/bash --uid ${APP_USER_ID} app USER ${APP_USER_ID}