Created
July 2, 2014 07:18
-
-
Save michaelneale/491134409fa7a1c32119 to your computer and use it in GitHub Desktop.
Enable SSHD in docker container via systemd in arch
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
RUN pacman -Sqyu --noconfirm --needed openssh && \ | |
systemctl enable sshd | |
# configure ssh | |
RUN sed -i \ | |
-e 's/^#*\(PermitRootLogin\) .*/\1 yes/' \ | |
-e 's/^#*\(PasswordAuthentication\) .*/\1 yes/' \ | |
-e 's/^#*\(PermitEmptyPasswords\) .*/\1 yes/' \ | |
-e 's/^#*\(UsePAM\) .*/\1 no/' \ | |
/etc/ssh/sshd_config | |
ENV container docker | |
EXPOSE 22 | |
CMD /usr/lib/systemd/systemd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment