-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
23 lines (17 loc) · 963 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM ubuntu:latest
MAINTAINER Clemens Rumpfhuber <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y ssh build-essential gcc g++ gdb clang cmake rsync tar python
RUN apt-get clean -y
RUN adduser --disabled-password clionremote
RUN mkdir /etc/ssh/keys/
RUN echo 'Protocol 2' >> /etc/ssh/sshd_config.d/remoteclion.conf
RUN echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config.d/remoteclion.conf
RUN echo 'AuthorizedKeysFile /etc/ssh/keys/%u' >> /etc/ssh/sshd_config.d/remoteclion.conf
RUN echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config.d/remoteclion.conf
RUN echo 'ChallengeResponseAuthentication no' >> /etc/ssh/sshd_config.d/remoteclion.conf
RUN echo 'Subsystem sftp /usr/lib/openssh/sftp-server' >> /etc/ssh/sshd_config.d/remoteclion.conf
COPY id_ed25519.pub /etc/ssh/keys/clionremote
RUN mkdir /run/sshd
CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/etc/ssh/sshd_config.d/remoteclion.conf"]