only create group if not exists

This commit is contained in:
burnettk 2024-07-01 15:10:18 -04:00
parent cb41f952d6
commit 6db4ab669f
No known key found for this signature in database
2 changed files with 11 additions and 11 deletions

View File

@ -12,8 +12,8 @@ RUN apt-get update \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN addgroup --gid $GROUP_ID $GROUP_NAME \ RUN if ! getent group "$GROUP_ID"; then addgroup --gid $GROUP_ID $GROUP_NAME; fi
&& adduser --uid $USER_ID --gid $GROUP_ID $USER_NAME RUN adduser --uid $USER_ID --gid $GROUP_ID $USER_NAME
RUN git config --global --add safe.directory /app RUN git config --global --add safe.directory /app