Skip to content

Commit 2de12e2

Browse files
slurmrestd user
1 parent 3f8b917 commit 2de12e2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

slurm-docker-cluster/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ FROM debian:bookworm
77
ARG SLURM_VERSION="24.05.4"
88
ARG SLURM_USER_UID=990
99
ARG SLURM_USER_GID=990
10+
ARG SLURMRESTD_USER_UID=65533
11+
ARG SLURMRESTD_USER_GID=65533
1012
ARG MYSQL_CONFIG_VERSION="0.8.34"
1113

1214
COPY --from=uv /uv /bin/uv
@@ -46,6 +48,9 @@ COPY --chown=slurm:slurm slurmdbd.conf /etc/slurm/slurmdbd.conf
4648
RUN chmod 600 /etc/slurm/slurm.conf
4749
RUN chmod 600 /etc/slurm/slurmdbd.conf
4850

51+
RUN addgroup --gid="$SLURMRESTD_USER_GID" slurmrestd
52+
RUN adduser --system --uid="$SLURMRESTD_USER_UID" --ingroup slurmrestd slurmrestd
53+
4954
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
5055
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
5156
CMD ["slurmdbd"]

slurm-docker-cluster/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fi
4848
if [ "$1" = "slurmrestd" ]
4949
then
5050
shift 1
51-
exec setpriv --reuid=nobody --regid=nobody --init-groups /usr/sbin/slurmrestd
51+
exec setpriv --reuid=slurmrestd --regid=slurmrestd --init-groups /usr/sbin/slurmrestd "$@"
5252
fi
5353

5454
set -x

0 commit comments

Comments
 (0)