running_ssh_service.Dockerfile 601 B

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