Skip to content

Commit

Permalink
change Docker user groups
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-oleynik committed Sep 26, 2024
1 parent 170318a commit 127e236
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
FROM debian:bookworm

ARG SLURM_VERSION

ARG SLURM_USER=slurm
ARG SLURM_UID=990

ARG SLURM_GROUP=slurm
ARG SLURM_GID=990

ARG MUNGE_UID=107
ARG MUNGE_GID=114

RUN apt-get update && apt-get upgrade --yes \
libpmix-bin wget dpkg
Expand All @@ -20,9 +27,9 @@ RUN apt-get install --yes -f \
/build/slurm-smd-slurmctld_$SLURM_VERSION-1_amd64.deb \
/build/slurm-smd-slurmdbd_$SLURM_VERSION-1_amd64.deb

RUN groupadd -rg 1001 $SLURM_GROUP && useradd -rg $SLURM_GROUP -u 1001 $SLURM_USER
RUN groupmod -g 1002 munge && \
usermod -g munge -u 1002 munge && \
RUN groupadd -rg $SLURM_GID $SLURM_GROUP &&
useradd -rg $SLURM_GROUP -u $SLURM_UID $SLURM_USER
RUN groupmod -g $MUNGE_GID munge && \
usermod -g munge -u $MUNGE_UID munge && \
chown -R munge:munge /var/lib/munge && \
chown -R munge:munge /etc/munge
RUN groupadd -rg 1003 slurmrestd && useradd -rg slurmrestd -u 1003 slurmrestd
Empty file added Dockerfile.exporter
Empty file.

0 comments on commit 127e236

Please sign in to comment.