Added sample Dockerfile for dev environment

This commit is contained in:
cheezedoodle2
2023-06-06 05:25:45 -07:00
parent e250606726
commit 1203e03e2b
5 changed files with 19 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
FROM ubuntu
RUN apt update
RUN apt install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:password' | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
ADD authorized_keys /root/.ssh/authorized_keys
RUN chmod 600 /root/.ssh/authorized_keys
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]