From 6d69b7796b970039b725ec8937433eb68148f5f9 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Tue, 2 Apr 2024 21:42:14 +0200 Subject: [PATCH] Ref #187 - Make all the data www-data:www-data --- Dockerfile-alpine.template | 2 ++ Dockerfile-debian.template | 2 ++ apache/Dockerfile | 2 ++ fpm-alpine/Dockerfile | 2 ++ fpm/Dockerfile | 2 ++ 5 files changed, 10 insertions(+) diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 7eb78444..f2376397 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -114,10 +114,12 @@ RUN set -ex; \ sed -i "s@'configFile' => .*@'configFile' => '/etc/phpmyadmin/config.inc.php',@" /var/www/html/libraries/vendor_config.php; \ grep -q -F "'configFile' => '/etc/phpmyadmin/config.inc.php'," /var/www/html/libraries/vendor_config.php; \ php -l /var/www/html/libraries/vendor_config.php; \ + chown -R www-data:www-data -R /var/www/html/; \ apk del --no-network .fetch-deps # Copy configuration COPY config.inc.php /etc/phpmyadmin/config.inc.php +RUN chown www-data:www-data -R /etc/phpmyadmin/ # Copy main script COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index f69e70fb..7c757e09 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -130,6 +130,7 @@ RUN set -ex; \ sed -i "s@'configFile' => .*@'configFile' => '/etc/phpmyadmin/config.inc.php',@" /var/www/html/libraries/vendor_config.php; \ grep -q -F "'configFile' => '/etc/phpmyadmin/config.inc.php'," /var/www/html/libraries/vendor_config.php; \ php -l /var/www/html/libraries/vendor_config.php; \ + chown -R www-data:www-data -R /var/www/html/; \ \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark; \ @@ -138,6 +139,7 @@ RUN set -ex; \ # Copy configuration COPY config.inc.php /etc/phpmyadmin/config.inc.php +RUN chown www-data:www-data -R /etc/phpmyadmin/ # Copy main script COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/apache/Dockerfile b/apache/Dockerfile index 3435ad4d..2984356b 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -131,6 +131,7 @@ RUN set -ex; \ sed -i "s@'configFile' => .*@'configFile' => '/etc/phpmyadmin/config.inc.php',@" /var/www/html/libraries/vendor_config.php; \ grep -q -F "'configFile' => '/etc/phpmyadmin/config.inc.php'," /var/www/html/libraries/vendor_config.php; \ php -l /var/www/html/libraries/vendor_config.php; \ + chown -R www-data:www-data -R /var/www/html/; \ \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark; \ @@ -139,6 +140,7 @@ RUN set -ex; \ # Copy configuration COPY config.inc.php /etc/phpmyadmin/config.inc.php +RUN chown www-data:www-data -R /etc/phpmyadmin/ # Copy main script COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/fpm-alpine/Dockerfile b/fpm-alpine/Dockerfile index 60b095f9..f9479944 100644 --- a/fpm-alpine/Dockerfile +++ b/fpm-alpine/Dockerfile @@ -115,10 +115,12 @@ RUN set -ex; \ sed -i "s@'configFile' => .*@'configFile' => '/etc/phpmyadmin/config.inc.php',@" /var/www/html/libraries/vendor_config.php; \ grep -q -F "'configFile' => '/etc/phpmyadmin/config.inc.php'," /var/www/html/libraries/vendor_config.php; \ php -l /var/www/html/libraries/vendor_config.php; \ + chown -R www-data:www-data -R /var/www/html/; \ apk del --no-network .fetch-deps # Copy configuration COPY config.inc.php /etc/phpmyadmin/config.inc.php +RUN chown www-data:www-data -R /etc/phpmyadmin/ # Copy main script COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/fpm/Dockerfile b/fpm/Dockerfile index 19b3f601..4ec338b0 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -128,6 +128,7 @@ RUN set -ex; \ sed -i "s@'configFile' => .*@'configFile' => '/etc/phpmyadmin/config.inc.php',@" /var/www/html/libraries/vendor_config.php; \ grep -q -F "'configFile' => '/etc/phpmyadmin/config.inc.php'," /var/www/html/libraries/vendor_config.php; \ php -l /var/www/html/libraries/vendor_config.php; \ + chown -R www-data:www-data -R /var/www/html/; \ \ apt-mark auto '.*' > /dev/null; \ apt-mark manual $savedAptMark; \ @@ -136,6 +137,7 @@ RUN set -ex; \ # Copy configuration COPY config.inc.php /etc/phpmyadmin/config.inc.php +RUN chown www-data:www-data -R /etc/phpmyadmin/ # Copy main script COPY docker-entrypoint.sh /docker-entrypoint.sh