Skip to content

Commit 82723dc

Browse files
committed
fix: don't forget to assign user to group if group exists
1 parent 066d409 commit 82723dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/containers/ci/ci-slim.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ RUN set -ex; \
123123
ARG USER_ID=1000 \
124124
GROUP_ID=1000
125125
RUN set -ex; \
126-
getent group ${GROUP_ID} || groupmod -g ${GROUP_ID} -n dash ubuntu; \
126+
(getent group ${GROUP_ID} && usermod -g ${GROUP_ID} ubuntu) || groupmod -g ${GROUP_ID} -n dash ubuntu; \
127127
usermod -u ${USER_ID} -md /home/dash -l dash ubuntu; \
128128
chown ${USER_ID}:${GROUP_ID} -R /home/dash; \
129129
mkdir -p /src/dash && \

0 commit comments

Comments
 (0)