github.com/iamlotus/docker@v1.8.1/docs/examples/running_ssh_service.Dockerfile (about) 1 # sshd 2 # 3 # VERSION 0.0.2 4 5 FROM ubuntu:14.04 6 MAINTAINER Sven Dowideit <SvenDowideit@docker.com> 7 8 RUN apt-get update && apt-get install -y openssh-server 9 RUN mkdir /var/run/sshd 10 RUN echo 'root:screencast' | chpasswd 11 RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config 12 13 # SSH login fix. Otherwise user is kicked off after login 14 RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd 15 16 ENV NOTVISIBLE "in users profile" 17 RUN echo "export VISIBLE=now" >> /etc/profile 18 19 EXPOSE 22 20 CMD ["/usr/sbin/sshd", "-D"]