File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM ghcr.io/nearnodeflash/nnf-dm-copy-offload:0.1.19
22
33# Build arguments for user UID/GID
4- ARG USER_UID=1060
5- ARG USER_GID=100
4+ ARG USER_UID=1234
5+ ARG USER_GID=1234
66
77# Set environment variables
88ENV USER_UID=${USER_UID}
@@ -38,13 +38,6 @@ RUN cat ${KEYS_DIR}mpiuser_key.pub > ${KEYS_DIR}/authorized_keys
3838# Override any entrypoint from base image and set our own
3939COPY entrypoint.sh /entrypoint.sh
4040RUN chmod a+x /entrypoint.sh
41-
42- # Set proper permissions on keys
43- RUN chmod 600 ${KEYS_DIR}/ssh_host_rsa_key && \
44- chmod 644 ${KEYS_DIR}/ssh_host_rsa_key.pub && \
45- chmod 600 ${KEYS_DIR}/authorized_keys && \
46- chmod 700 /home/mpiuser/.ssh && \
47- chown -R ${USER_UID}:${USER_GID} /home/mpiuser
4841
4942# USER mpiuser
5043WORKDIR /home/mpiuser
@@ -55,6 +48,13 @@ RUN echo "HostKey $KEYS_DIR/ssh_host_rsa_key" > "$SESSION_DIR/sshd_config" && \
5548 echo "PermitRootLogin no" >> "$SESSION_DIR/sshd_config" && \
5649 echo "PasswordAuthentication no" >> "$SESSION_DIR/sshd_config"
5750
51+ # Set proper permissions on keys
52+ RUN chmod 600 ${KEYS_DIR}/ssh_host_rsa_key && \
53+ chmod 644 ${KEYS_DIR}/ssh_host_rsa_key.pub && \
54+ chmod 600 ${KEYS_DIR}/authorized_keys && \
55+ chmod 700 /home/mpiuser/.ssh && \
56+ chown -R ${USER_UID}:${USER_GID} /home/mpiuser
57+
5858# Labels for identifying the UID/GID
5959LABEL uid="${USER_UID}"
6060LABEL gid="${USER_GID}"
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3+ echo " Starting SSH container entrypoint script..."
4+
5+ whoami
6+ id
7+
38ls -la /home/mpiuser
49ls -la /home/mpiuser/ssh-session
510
You can’t perform that action at this time.
0 commit comments