Skip to content

Commit

Permalink
Rebuild for ssh setup
Browse files Browse the repository at this point in the history
  • Loading branch information
wtripp180901 committed Jun 29, 2023
1 parent df4b684 commit 63f5fb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ RUN set -ex \
http-parser-devel \
json-c-devel \
mpitests-openmpi \
openssh-server \
&& yum clean all \
&& rm -rf /var/cache/yum

Expand Down Expand Up @@ -63,7 +64,9 @@ RUN set -x \
&& popd \
&& rm -rf slurm \
&& groupadd -r --gid=990 slurm \
&& useradd -r -g slurm --uid=990 slurm
&& useradd -r -g slurm --uid=990 slurm \
&& groupadd --gid=1000 rocky \
&& useradd -g rocky --uid=1000 rocky

RUN mkdir /etc/sysconfig/slurm \
/var/spool/slurmd \
Expand Down
4 changes: 4 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ fi
if [ "$1" = "login" ]
then
echo "---> Starting the MUNGE Authentication service (munged) ..."
exec service ssh start
for USER in /home/*;
do (chown -R $USER $USER:$USER || echo "Failed to take ownership of $USER") && (chmod 600 /home/$USER/.ssh/authorized_keys || echo "Couldn't set permissions for .ssh keys for $USER");
done
gosu munge /usr/sbin/munged -F
fi

Expand Down

0 comments on commit 63f5fb1

Please sign in to comment.