Dockerfile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 apt-get update && apt-get install -yq sudo php5 php5-cli php5-mysql php-pear php-soap php5-xsl
  6. RUN apt-get update && apt-get install -yq cron patch apache2 libapache2-mod-php5
  7. COPY wsdl/ /var/www/html/
  8. RUN mkdir -p /var/log/supervisor/
  9. EXPOSE 80/tcp
  10. ##################################################################
  11. #sshd server
  12. RUN apt-get install -yq openssh-server
  13. RUN apt-get update && apt-get install -y openssh-server
  14. RUN mkdir /var/run/sshd
  15. #RUN echo 'root:screencast' | chpasswd
  16. #RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
  17. # SSH login fix. Otherwise user is kicked off after login
  18. RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
  19. ENV NOTVISIBLE "in users profile"
  20. RUN echo "export VISIBLE=now" >> /etc/profile
  21. RUN mkdir /etc/ssh/keys/
  22. COPY keys/bitbucket.id_rsa.pub /etc/ssh/keys/authorized_keys
  23. RUN chmod 0700 /etc/ssh/keys
  24. RUN chmod 0600 /etc/ssh/keys/authorized_keys
  25. RUN chown root:root -R /etc/ssh/keys
  26. EXPOSE 22
  27. ##################################################################
  28. RUN touch /var/log/cron.log
  29. RUN echo 'www-data ALL=(ALL) NOPASSWD: ALL' | sudo EDITOR='tee -a' visudo
  30. CMD bash -c "/usr/sbin/sshd ; while true; do supervisord --configuration /etc/supervisord/supervisor.conf --nodaemon ; sleep 5 ; done"