From c9bfe017ac6aace1db225b752bddf7940f31822b Mon Sep 17 00:00:00 2001 From: lipido Date: Fri, 22 Sep 2017 18:35:19 +0200 Subject: [PATCH] Refactors PHP_DISPLAY_ERRORS configuration variable In order to follow the same philosophy as the original image we define a default value for PHP_DISPLAY_ERRORS in the Dockerfile --- Dockerfile | 1 + run.sh | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a4e8e75..c870624 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 f9ecd33..2df107a 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 -- 2.18.1