fix: update containerfile user/group management commands (#379)
- Replace `addgroup` with `groupadd` for system group creation - Replace `adduser` with `useradd` for system user creation - Maintain same functionality while using more standard POSIX commands
This commit is contained in:
@@ -13,9 +13,9 @@ ARG USER_HOME=/app
|
|||||||
ENV HOME=$USER_HOME
|
ENV HOME=$USER_HOME
|
||||||
RUN if [ $UID -ne 0 ]; then \
|
RUN if [ $UID -ne 0 ]; then \
|
||||||
if [ $GID -ne 0 ]; then \
|
if [ $GID -ne 0 ]; then \
|
||||||
addgroup --system --gid $GID app; \
|
groupadd --system --gid $GID app; \
|
||||||
fi; \
|
fi; \
|
||||||
adduser --system --no-create-home --uid $UID --gid $GID \
|
useradd --system --uid $UID --gid $GID \
|
||||||
--home $USER_HOME app; \
|
--home $USER_HOME app; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user