From a4795c8c98577e0f4a98ce4e4b40bd4dbd169620 Mon Sep 17 00:00:00 2001 From: Marc Toensing Date: Wed, 21 Aug 2024 23:09:37 +0200 Subject: [PATCH] still trying to fix the " fatal: The GID `1000' is already in use" error --- docker-entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index d2f0d1c..0e78868 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -15,12 +15,13 @@ if ! id "$DOCKER_USER" >/dev/null 2>&1; then if getent group $GROUP_ID >/dev/null 2>&1; then EXISTING_GROUP=$(getent group $GROUP_ID | cut -d: -f1) echo "GID $GROUP_ID is already in use by group $EXISTING_GROUP. Using this group." + DOCKER_GROUP=$EXISTING_GROUP else addgroup --gid $GROUP_ID $DOCKER_GROUP echo "Created group $DOCKER_GROUP with GID $GROUP_ID." fi - # Create user with the specified UID and existing or new group + # Create user with the specified UID and associated group adduser --shell /bin/sh --uid $USER_ID --ingroup $DOCKER_GROUP --disabled-password --gecos "" $DOCKER_USER # Set ownership and permissions