diff options
author | startxfr <clarue@startx.fr> | 2015-12-06 16:41:23 +0100 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2015-12-06 16:41:23 +0100 |
commit | 7fe1c9cf9f114d40fe3f534a3902f3dff73c602f (patch) | |
tree | 5d40c66b09a9eddab90ee209a71aa37eaed787cf /Services/php | |
parent | 6fc395ce332cf2565705b3a36bceaaa6f3948417 (diff) | |
download | phpmyadmin-7fe1c9cf9f114d40fe3f534a3902f3dff73c602f.tar.gz phpmyadmin-7fe1c9cf9f114d40fe3f534a3902f3dff73c602f.tar.bz2 phpmyadmin-7fe1c9cf9f114d40fe3f534a3902f3dff73c602f.tar.xz phpmyadmin-7fe1c9cf9f114d40fe3f534a3902f3dff73c602f.zip |
correcting bug and improve startup display
Diffstat (limited to 'Services/php')
-rw-r--r-- | Services/php/Dockerfile | 16 | ||||
-rw-r--r-- | Services/php/httpd.conf | 1 | ||||
-rw-r--r-- | Services/php/run.sh | 11 |
3 files changed, 20 insertions, 8 deletions
diff --git a/Services/php/Dockerfile b/Services/php/Dockerfile index 51085e9..7cb96b5 100644 --- a/Services/php/Dockerfile +++ b/Services/php/Dockerfile @@ -10,19 +10,21 @@ RUN dnf -y install php php-pecl-mongo php-cli php-pear \ && dnf clean all ENV LOG_PATH=/data/logs/apache_php \ APP_PATH=/data/apache_php \ - STARTUPLOG=/data/logs/apache_php/startup.log + STARTUPLOG=/data/logs/apache_php/startup.log \ + TMP_APP_PATH=/tmp/apache COPY httpd.conf $HTTPDCONF COPY php.ini /etc/php.d/sx.ini COPY run.sh /bin/ RUN chmod 775 /bin/run.sh && \ chmod ug+r $HTTPDCONF && \ - mkdir $APP_PATH && \ - mkdir $LOG_PATH && \ + mkdir -p $TMP_APP_PATH && \ + mkdir -p $APP_PATH && \ + mkdir -p $LOG_PATH && \ touch $STARTUPLOG -COPY ./ $APP_PATH -RUN rm -f $APP_PATH/Dockerfile $APP_PATH/httpd.conf $APP_PATH/run.sh && \ - chown -R apache:apache $APP_PATH $LOG_PATH && \ - chmod ug+r -R $APP_PATH +COPY ./ $TMP_APP_PATH +RUN rm -f $TMP_APP_PATH/Dockerfile $TMP_APP_PATH/httpd.conf $TMP_APP_PATH/run.sh && \ + chown -R apache:apache $TMP_APP_PATH $APP_PATH $LOG_PATH && \ + chmod ug+r -R $TMP_APP_PATH $APP_PATH EXPOSE 80 443 VOLUME [$APP_PATH,$LOG_PATH] diff --git a/Services/php/httpd.conf b/Services/php/httpd.conf index 1ce768f..9cbe16a 100644 --- a/Services/php/httpd.conf +++ b/Services/php/httpd.conf @@ -10,7 +10,6 @@ ErrorLog ${LOG_PATH}/error.log CustomLog ${LOG_PATH}/access.log combined </IfModule> -Alias / ${APP_PATH} <Directory ${APP_PATH}> AddDefaultCharset UTF-8 AllowOverride All diff --git a/Services/php/run.sh b/Services/php/run.sh index a092c56..657fbba 100644 --- a/Services/php/run.sh +++ b/Services/php/run.sh @@ -37,6 +37,17 @@ function display_container_php_header { # and start generating host keys function begin_php_config { echo "=> BEGIN APACHE + PHP CONFIGURATION" + if [[ -d $TMP_APP_PATH ]]; then + if [ "$(ls -A $TMP_APP_PATH)" ]; then + echo "COPY application from $TMP_APP_PATH into $APP_PATH" + FILE_LIST=$(find $TMP_APP_PATH -maxdepth 1 -mindepth 1 -printf "%f\n") + for FILE in $FILE_LIST; do + echo -n "adding $APP_PATH/$FILE" + cp -r $TMP_APP_PATH/$FILE $APP_PATH/ + echo " DONE" + done + fi + fi } # End configuration process just before starting daemon |