From b8e7570dc04c2bce9c94b60bc68d3398c91c38ec Mon Sep 17 00:00:00 2001 From: Sebastian Slettebakken <43045439+sebastas@users.noreply.github.com> Date: Thu, 2 Jul 2026 16:36:23 +0200 Subject: [PATCH] fix: update user and group modification logic in entrypoint script (again) --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3ec55bc..ead88e0 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,14 +8,14 @@ PGID=${PGID:-1001} if [ "$PGID" != "1001" ]; then existing_group=$(getent group "$PGID" | cut -d: -f1) if [ -n "$existing_group" ] && [ "$existing_group" != "nodejs" ]; then - groupdel "$existing_group" + groupmod -g "$((PGID + 50000))" "$existing_group" fi groupmod -g "$PGID" nodejs fi if [ "$PUID" != "1001" ]; then existing_user=$(getent passwd "$PUID" | cut -d: -f1) if [ -n "$existing_user" ] && [ "$existing_user" != "nextjs" ]; then - userdel "$existing_user" + usermod -u "$((PUID + 50000))" "$existing_user" fi usermod -u "$PUID" nextjs fi