wip: connect container through ssh

This commit is contained in:
Justin Lin committed 2024-10-10 20:54:42 +08:00
1 parent 08e9191c4b
commit 19897e607f
4 files changed
+73 -12

No files matched your search

+4 -3
View File
@@ -29,7 +29,8 @@ COPY ./ssh_pubkey /home/${USERNAME}/.ssh/authorized_keys
RUN chmod 600 /home/${USERNAME}/.ssh/authorized_keys
RUN chmod 700 /home/${USERNAME}/.ssh
USER ${USERNAME}
RUN service ssh start
WORKDIR /home/${USERNAME}
CMD [ "/bin/zsh" ]
EXPOSE 22
CMD [ "/usr/sbin/sshd", "-D" ]