Last active
September 12, 2018 08:20
-
-
Save Exchizz/57b6db278366e50c36c290e01836e979 to your computer and use it in GitHub Desktop.
Dockerfile for RPIimage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM arm32v7/debian:stretch | |
RUN apt-get update && apt-get install -y openssh-server sudo iptables | |
RUN mkdir /var/run/sshd | |
RUN useradd -ms /bin/bash -g sudo student | |
RUN echo 'student:Plz4Ch4nG3' | chpasswd | |
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin no/' /etc/ssh/sshd_config | |
# SSH login fix. Otherwise user is kicked off after login | |
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd | |
EXPOSE 22 | |
CMD ["/usr/sbin/sshd", "-D"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment