diff --git a/Dockerfile b/Dockerfile index 4041f04..beeb3dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,10 @@ RUN apt update -y && \ ssh-keygen -A && \ service ssh --full-restart -RUN service ssh start +RUN sed -E -i 's|#AuthorizedKeysFile(\s*).ssh/authorized_keys.*|AuthorizedKeysFile\1/home/git/.ssh/authorized_keys|' /etc/ssh/sshd_config && \ + sed 's/#PubkeyAuthentication/PubkeyAuthentication/' /etc/ssh/sshd_config && \ + service ssh start + USER git WORKDIR /home/git/ @@ -39,4 +42,4 @@ RUN echo $(which git-shell) >> /etc/shells && \ EXPOSE 22 # "-e" lets us get logs from the sshd service directly through docker logs, good for troubleshooting weird ssh issues -CMD ["/usr/sbin/sshd","-D", "-e"] \ No newline at end of file +CMD ["/usr/sbin/sshd","-D", "-e"]