From 944466796c3ed62022b436f2272734c5f4ca80ab Mon Sep 17 00:00:00 2001 From: MountainGod2 Date: Mon, 9 Dec 2024 13:07:46 -0700 Subject: [PATCH] fix(docker): prevent duplicate group creation in Dockerfile --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 70e9713..58b44e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,11 @@ ENV UID=99 ENV GID=100 # Create a group and user based on the environment variables -RUN addgroup -g "$GID" appgroup && \ +RUN if ! getent group "$GID"; then \ + addgroup -g "$GID" appgroup; \ + else \ + echo "Group with GID $GID already exists, skipping addgroup."; \ + fi && \ adduser -u "$UID" -G appgroup -D appuser # Configure environment variables for the virtual environment