Skip to content

Commit

Permalink
change pidfile directory for permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Panaetius committed Jan 26, 2023
1 parent d94a8f9 commit 4d92ea3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docker/py/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN apt-get update && apt-get install -yq --no-install-recommends \
ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1

# Setup ssh keys
RUN mkdir -p /opt/ssh/sshd_config.d /opt/ssh/ssh_host_keys && \
RUN mkdir -p /opt/ssh/sshd_config.d /opt/ssh/ssh_host_keys /opt/ssh/pid && \
ssh-keygen -q -N "" -t dsa -f /opt/ssh/ssh_host_keys/ssh_host_dsa_key && \
ssh-keygen -q -N "" -t rsa -b 4096 -f /opt/ssh/ssh_host_keys/ssh_host_rsa_key && \
ssh-keygen -q -N "" -t ecdsa -f /opt/ssh/ssh_host_keys/ssh_host_ecdsa_key && \
Expand All @@ -45,7 +45,8 @@ RUN mkdir -p /opt/ssh/sshd_config.d /opt/ssh/ssh_host_keys && \
COPY sshd_config /opt/ssh/sshd_config

RUN chown -R 0:100 /opt/ssh/ && \
chmod -R u=rwX,g=rX,o= /opt/ssh
chmod -R u=rwX,g=rX,o= /opt/ssh && \
chmod -R u=rwX,g=rwX,o= /opt/ssh/pid

# switch to the notebook user
USER $NB_USER
Expand Down
2 changes: 1 addition & 1 deletion docker/py/sshd_config
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ UsePAM no

X11Forwarding yes
PrintMotd no
PidFile /opt/ssh/sshd.pid
PidFile /opt/ssh/pid/sshd.pid

AcceptEnv LANG LC_*

Expand Down

0 comments on commit 4d92ea3

Please sign in to comment.