Dockerfile 927 B

1234567891011121314151617181920212223242526272829
  1. FROM girish/base:0.1.0
  2. MAINTAINER Girish Ramakrishnan <girish@forwardbias.in>
  3. ENV DEBIAN_FRONTEND noninteractive
  4. RUN mkdir -p /app/code
  5. WORKDIR /app/code
  6. RUN curl -L http://wordpress.org/wordpress-4.1.tar.gz | tar -xz --strip-components 1 -f -
  7. RUN chown -R www-data.www-data /app/code
  8. ADD start.sh /app/code/start.sh
  9. RUN chmod +x /app/code/start.sh
  10. ADD wp-config.php.template /app/configs/wp-config.php.template
  11. RUN ln -sf /app/data/wp-config.php /app/code/wp-config.php
  12. # configure apache
  13. RUN rm /etc/apache2/sites-enabled/*
  14. RUN sed -i 's/upload_max_filesize = .*/upload_max_filesize = 8M/' /etc/php5/apache2/php.ini
  15. ADD apache2-wordpress.conf /etc/apache2/sites-available/wordpress.conf
  16. RUN ln -sf /etc/apache2/sites-available/wordpress.conf /etc/apache2/sites-enabled/wordpress.conf
  17. RUN a2enmod php5
  18. # supervisor
  19. ADD supervisor-apache2.conf /etc/supervisor/conf.d/apache2.conf
  20. EXPOSE 80
  21. CMD [ "/app/code/start.sh" ]