Dockerfile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. FROM cloudron/base:0.8.1
  2. MAINTAINER Johannes Zellner <johannes@cloudron.io>
  3. RUN mkdir -p /app/data /app/code /run/app/sessions
  4. WORKDIR /app/data
  5. # configure apache
  6. RUN rm /etc/apache2/sites-enabled/*
  7. RUN sed -e 's,^ErrorLog.*,ErrorLog "|/bin/cat",' -i /etc/apache2/apache2.conf
  8. RUN sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-available/mpm_prefork.conf
  9. RUN a2disconf other-vhosts-access-log
  10. RUN echo "Listen 8000" > /etc/apache2/ports.conf
  11. # configure mod_php
  12. RUN a2enmod php5 rewrite dav dav_fs authnz_ldap
  13. RUN sed -e 's/upload_max_filesize = .*/upload_max_filesize = 8M/' \
  14. -e 's,;session.save_path.*,session.save_path = "/run/app/sessions",' \
  15. -i /etc/php5/apache2/php.ini
  16. RUN ln -sf /app/data/apache2-app.conf /etc/apache2/sites-available/app.conf
  17. RUN ln -sf /etc/apache2/sites-available/app.conf /etc/apache2/sites-enabled/app.conf
  18. # configure supervisor
  19. RUN sed -e 's,^logfile=.*$,logfile=/run/app/supervisord.log,' -i /etc/supervisor/supervisord.conf
  20. ADD supervisor/ /etc/supervisor/conf.d/
  21. ENV PATH /usr/local/node-4.2.1/bin:$PATH
  22. RUN cd /app/code && npm install ftpd superagent
  23. ADD apache2-app.conf /app/code/apache2-app.conf
  24. ADD index.html /app/code/index.html
  25. ADD start.sh /app/code/start.sh
  26. ADD ftp.js /app/code/ftp.js
  27. CMD [ "/app/code/start.sh" ]