diff --git a/Dockerfile b/Dockerfile index a4e8e759310596147a89846df046cb03b9101cbd..c8706246dda8893e17da6af8dcc13b8e86fb8a3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ FROM mattrayner/lamp:latest-1604 +ENV PHP_DISPLAY_ERRORS Off ADD run.sh /run.sh diff --git a/run.sh b/run.sh index f9ecd33b1c0bcb16dcac04e0a31105e9b613c6c6..2df107a46f5b06d6ec08534423434296c4af7992 100755 --- a/run.sh +++ b/run.sh @@ -3,11 +3,8 @@ VOLUME_HOME="/var/lib/mysql" sed -ri -e "s/^upload_max_filesize.*/upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}/" \ - -e "s/^post_max_size.*/post_max_size = ${PHP_POST_MAX_SIZE}/" /etc/php/5.6/apache2/php.ini - -if [ "$PHP_DISPLAY_ERRORS" == "On" ];then - sed -ri -e "s/^display_errors.*/display_errors = On/" /etc/php/5.6/apache2/php.ini -fi + -e "s/^post_max_size.*/post_max_size = ${PHP_POST_MAX_SIZE}/" \ + -e "s/^display_errors.*/display_errors = ${PHP_DISPLAY_ERRORS}/" /etc/php/5.6/apache2/php.ini sed -i "s/export APACHE_RUN_GROUP=www-data/export APACHE_RUN_GROUP=staff/" /etc/apache2/envvars