Dockerfile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ##################################################################
  2. FROM debian:8.0
  3. RUN apt-get update && apt-get install -yq parallel git vim tmux python-pip lockfile-progs expect telnet
  4. RUN pip install supervisor
  5. RUN mkdir -p /var/log/supervisor/
  6. EXPOSE 9001
  7. ##################################################################
  8. #sshd server
  9. RUN apt-get install -yq openssh-server
  10. RUN apt-get update && apt-get install -y openssh-server
  11. RUN mkdir /var/run/sshd
  12. #RUN echo 'root:screencast' | chpasswd
  13. #RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
  14. # SSH login fix. Otherwise user is kicked off after login
  15. RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
  16. ENV NOTVISIBLE "in users profile"
  17. RUN echo "export VISIBLE=now" >> /etc/profile
  18. RUN mkdir /etc/ssh/keys/
  19. COPY keys/bitbucket.id_rsa.pub /etc/ssh/keys/authorized_keys
  20. RUN chmod 0700 /etc/ssh/keys
  21. RUN chmod 0600 /etc/ssh/keys/authorized_keys
  22. RUN chown root:root -R /etc/ssh/keys
  23. EXPOSE 22
  24. ##################################################################
  25. CMD bash -c "/usr/sbin/sshd ; while true; do supervisord --configuration /etc/supervisord/supervisor.conf --nodaemon ; sleep 5 ; done"