Explorar el Código

use crudini to rewrite config

Girish Ramakrishnan hace 8 años
padre
commit
7df1c7db3f
Se han modificado 1 ficheros con 8 adiciones y 4 borrados
  1. 8 4
      Dockerfile

+ 8 - 4
Dockerfile

@@ -1,6 +1,11 @@
 FROM cloudron/base:0.9.0
 MAINTAINER Girish Ramakrishnan <girish@cloudron.io>
 
+# this can be removed in next base image update
+RUN apt-get update && \
+    apt-get install -y crudini && \
+    rm -r /var/cache/apt /var/lib/apt/lists
+
 RUN mkdir -p /app/code
 WORKDIR /app/code
 RUN curl -L http://wordpress.org/wordpress-4.6.1.tar.gz | tar -xz --strip-components 1 -f -
@@ -35,10 +40,9 @@ RUN echo "Listen 8000" > /etc/apache2/ports.conf
 
 # configure mod_php
 RUN a2enmod rewrite
-RUN sed -e 's/upload_max_filesize = .*/upload_max_filesize = 500M/' \
-        -e 's/post_max_size = .*/post_max_size = 500M/' \
-        -e 's,;session.save_path.*,session.save_path = "/run/wordpress/sessions",' \
-        -i /etc/php/7.0/apache2/php.ini
+RUN crudini --set /etc/php/7.0/apache2/php.ini PHP upload_max_filesize 500M && \
+    crudini --set /etc/php/7.0/apache2/php.ini PHP post_max_size 500M && \
+    crudini --set /etc/php/7.0/apache2/php.ini Session session.save_path /run/wordpress/sessions
 
 ADD start.sh /app/code/start.sh