From 5ae78473741a56e335dfc7831e7c501f97447fb0 Mon Sep 17 00:00:00 2001 From: William Brannon Date: Thu, 26 Sep 2024 04:54:36 +0000 Subject: [PATCH] fix bug of container group already existing --- images/comments/Dockerfile | 2 +- images/sentiment-topic/Dockerfile | 2 +- images/streamlit/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/comments/Dockerfile b/images/comments/Dockerfile index c6b7920..a225187 100644 --- a/images/comments/Dockerfile +++ b/images/comments/Dockerfile @@ -21,7 +21,7 @@ RUN if ! getent group ${GROUPID} >/dev/null; then \ # Check if the user exists, and create it if it doesn't RUN if ! getent passwd ${USERID} >/dev/null; then \ - useradd -m -u ${USERID} -g mygroup myuser; \ + useradd -m -u ${USERID} -g ${GROUPID} myuser; \ fi USER ${USERID}:${GROUPID} diff --git a/images/sentiment-topic/Dockerfile b/images/sentiment-topic/Dockerfile index a0e1af4..3c45455 100644 --- a/images/sentiment-topic/Dockerfile +++ b/images/sentiment-topic/Dockerfile @@ -21,7 +21,7 @@ RUN if ! getent group ${GROUPID} >/dev/null; then \ # Check if the user exists, and create it if it doesn't RUN if ! getent passwd ${USERID} >/dev/null; then \ - useradd -m -u ${USERID} -g mygroup myuser; \ + useradd -m -u ${USERID} -g ${GROUPID} myuser; \ fi USER ${USERID}:${GROUPID} diff --git a/images/streamlit/Dockerfile b/images/streamlit/Dockerfile index 957ad26..a928bea 100644 --- a/images/streamlit/Dockerfile +++ b/images/streamlit/Dockerfile @@ -22,7 +22,7 @@ RUN if ! getent group ${GROUPID} >/dev/null; then \ # Check if the user exists, and create it if it doesn't RUN if ! getent passwd ${USERID} >/dev/null; then \ - useradd -m -u ${USERID} -g mygroup myuser; \ + useradd -m -u ${USERID} -g ${GROUPID} myuser; \ fi USER ${USERID}:${GROUPID}