2014-02-13 01:12:21 -05:00
|
|
|
# sshd
|
|
|
|
#
|
2014-09-11 23:30:20 -04:00
|
|
|
# VERSION 0.0.2
|
2014-02-13 01:12:21 -05:00
|
|
|
|
2014-09-11 23:30:20 -04:00
|
|
|
FROM ubuntu:14.04
|
|
|
|
MAINTAINER Sven Dowideit <SvenDowideit@docker.com>
|
2014-02-13 01:12:21 -05:00
|
|
|
|
2014-07-07 14:06:34 -04:00
|
|
|
RUN apt-get update && apt-get install -y openssh-server
|
2014-06-05 14:10:52 -04:00
|
|
|
RUN mkdir /var/run/sshd
|
2014-09-11 23:30:20 -04:00
|
|
|
RUN echo 'root:screencast' | chpasswd
|
|
|
|
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
|
|
|
|
2014-09-21 23:32:34 -04:00
|
|
|
# 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
|
|
|
|
|
2014-09-11 23:30:20 -04:00
|
|
|
ENV NOTVISIBLE "in users profile"
|
|
|
|
RUN echo "export VISIBLE=now" >> /etc/profile
|
2014-02-13 01:12:21 -05:00
|
|
|
|
|
|
|
EXPOSE 22
|
2014-09-11 23:30:20 -04:00
|
|
|
CMD ["/usr/sbin/sshd", "-D"]
|