Dockerfile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. FROM cloudron/base:0.8.0
  2. MAINTAINER Girish Ramakrishnan <girish@cloudron.io>
  3. RUN mkdir -p /app/code
  4. WORKDIR /app/code
  5. RUN curl -L http://wordpress.org/wordpress-4.3.1.tar.gz | tar -xz --strip-components 1 -f -
  6. RUN mv /app/code/wp-content /app/code/wp-content-vanilla && ln -s /app/data/wp-content /app/code/wp-content
  7. ADD wp-config.php.template /app/code/wp-config.php.template
  8. ADD start.sh /app/code/start.sh
  9. RUN mkdir -p /run/wordpress/sessions && \
  10. ln -sf /run/wordpress/wp-config.php /app/code/wp-config.php
  11. RUN curl -o /app/code/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
  12. RUN chmod +x /app/code/wp
  13. # https://github.com/wp-cli/wp-cli/issues/1164
  14. RUN echo "<?php function wp_new_blog_notification() {} ?>" > /run/wordpress/disable-new-blog-notification.php
  15. # Get the plugins
  16. RUN curl -L -o /app/code/authLdap.zip https://github.com/gramakri/authLdap/archive/7ac3cbf.zip
  17. RUN curl -L -o /app/code/disable-wordpress-updates.zip https://downloads.wordpress.org/plugin/disable-wordpress-updates.1.4.7.zip
  18. RUN curl -L -o /app/code/wp-mail-smtp.zip https://downloads.wordpress.org/plugin/wp-mail-smtp.0.9.5.zip
  19. RUN chown -R www-data:www-data /app/code
  20. # configure apache
  21. RUN rm /etc/apache2/sites-enabled/*
  22. RUN sed -e 's,^ErrorLog.*,ErrorLog "|/bin/cat",' -i /etc/apache2/apache2.conf
  23. RUN sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-available/mpm_prefork.conf
  24. RUN a2disconf other-vhosts-access-log
  25. ADD apache2-wordpress.conf /etc/apache2/sites-available/wordpress.conf
  26. RUN ln -sf /etc/apache2/sites-available/wordpress.conf /etc/apache2/sites-enabled/wordpress.conf
  27. RUN echo "Listen 8000" > /etc/apache2/ports.conf
  28. # configure mod_php
  29. RUN a2enmod php5
  30. RUN sed -e 's/upload_max_filesize = .*/upload_max_filesize = 8M/' \
  31. -e 's,;session.save_path.*,session.save_path = "/run/wordpress/sessions",' \
  32. -i /etc/php5/apache2/php.ini
  33. CMD [ "/app/code/start.sh" ]