|
@@ -1,21 +1,31 @@
|
|
|
-FROM girish/base:0.5
|
|
|
+FROM girish/base:0.10
|
|
|
MAINTAINER Girish Ramakrishnan <girish@forwardbias.in>
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
-RUN mkdir -p /app/code && cd /app/code \
|
|
|
- && wget https://wordpress.org/latest.tar.gz \
|
|
|
- && tar zxvf latest.tar.gz --strip-components=1 \
|
|
|
- && rm latest.tar.gz \
|
|
|
- && chown -R www-data.www-data /app/code
|
|
|
+RUN mkdir -p /app/code
|
|
|
+WORKDIR /app/code
|
|
|
+RUN curl -L http://wordpress.org/wordpress-4.1.tar.gz | tar -xz --strip-components 1 -f -
|
|
|
+RUN chown -R www-data.www-data /app/code
|
|
|
|
|
|
-ADD scripts/ /app/base/scripts/
|
|
|
+ADD start.sh /app/code/start.sh
|
|
|
+RUN chmod +x /app/code/start.sh
|
|
|
|
|
|
-ADD wp-config.php /app/configs/wp-config.php
|
|
|
+ADD wp-config.php.template /app/configs/wp-config.php.template
|
|
|
+
|
|
|
+# configure apache
|
|
|
+RUN rm /etc/apache2/sites-enabled/*
|
|
|
+RUN sed -i 's/upload_max_filesize = .*/upload_max_filesize = 8M/' /etc/php5/apache2/php.ini
|
|
|
+ADD apache2-wordpress.conf /etc/apache2/sites-available/wordpress.conf
|
|
|
+RUN ln -sf /etc/apache2/sites-available/wordpress.conf /etc/apache2/sites-enabled/wordpress.conf
|
|
|
+RUN a2enmod php5
|
|
|
+
|
|
|
+# supervisor
|
|
|
+ADD supervisor-apache2.conf /etc/supervisor/conf.d/apache2.conf
|
|
|
|
|
|
# these links will become valid after setup is run
|
|
|
RUN ln -s /app/data/wp-config.php /app/code/wp-config.php
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
|
-CMD [ "/app/base/scripts/start.sh", "--lamp" ]
|
|
|
+CMD [ "/app/code/start.sh" ]
|