Dockerfile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. FROM ubuntu:14.04
  2. MAINTAINER Chanaka Mannapperuma <irusri@yahoo.com>
  3. # Setup environment
  4. ENV DEBIAN_FRONTEND noninteractive
  5. # Update sources
  6. RUN apt-get update -y
  7. # install http
  8. RUN apt-get install -y apache2 vim bash-completion unzip
  9. RUN mkdir -p /var/lock/apache2 /var/run/apache2
  10. # install mysql
  11. RUN apt-get install -y mysql-client mysql-server
  12. #RUN echo "NETWORKING=yes" > /etc/sysconfig/network
  13. # start mysqld to create initial tables
  14. #RUN service mysqld start
  15. # install php
  16. RUN apt-get install -y php5 php5-mysql php5-dev php5-gd php5-memcache php5-pspell php5-snmp snmp php5-xmlrpc libapache2-mod-php5 php5-cli
  17. #RUN yum install -y php php-mysql php-devel php-gd php-pecl-memcache php-pspell php-snmp php-xmlrpc php-xml
  18. # install supervisord
  19. RUN apt-get install -y supervisor
  20. RUN mkdir -p /var/log/supervisor
  21. # install sshd
  22. RUN apt-get install -y openssh-server openssh-client passwd
  23. RUN mkdir -p /var/run/sshd
  24. #RUN ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key && ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key
  25. RUN sed -ri 's/PermitRootLogin without-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
  26. RUN echo 'root:changeme' | chpasswd
  27. # Put your own public key at id_rsa.pub for key-based login.
  28. RUN mkdir -p /root/.ssh && touch /root/.ssh/authorized_keys && chmod 700 /root/.ssh
  29. #ADD id_rsa.pub /root/.ssh/authorized_keys
  30. #ADD genie /var/www/html/
  31. ADD supervisord.conf /etc/
  32. EXPOSE 22 80 443
  33. CMD ["supervisord", "-n"]