Skip to content

Commit

Permalink
Dockerfile: Add group by id not name
Browse files Browse the repository at this point in the history
When a group already exists with the specified gid, usermod with -f will
silently added the group with a default new gid. So worker ends up with
an extra useless group rather than the one specified.
  • Loading branch information
sjrct committed May 29, 2024
1 parent a4b9742 commit 3fcb6bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN ldconfig
# add user (+ group workaround for ArchLinux)
RUN useradd -m worker --uid ${uid} -G cdrom \
&& if [ -n "${optical_gid}" ]; then groupadd -f -g "${optical_gid}" optical \
&& usermod -a -G optical worker; fi \
&& usermod -a -G "${optical_gid}" worker; fi \
&& mkdir -p /output /home/worker/.config/whipper \
&& chown worker: /output /home/worker/.config/whipper
VOLUME ["/home/worker/.config/whipper", "/output"]
Expand Down

0 comments on commit 3fcb6bd

Please sign in to comment.