From 66fcbf089004b2cb12e2425c5e49e56d16473d6e Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Thu, 8 Oct 2020 13:56:49 -0700 Subject: [PATCH 1/2] templates: add wp-content/cache to pre-created directories --- Dockerfile-alpine.template | 3 ++- Dockerfile-debian.template | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index f5f252b454..e7cb288e88 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -81,8 +81,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 93940d00b2..8fd9417cda 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -86,8 +86,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \ From 1de7b5a2f3423908c9c46e21e143f4d3b5a763fe Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Thu, 8 Oct 2020 13:59:24 -0700 Subject: [PATCH 2/2] Run update.sh for wp-content/cache change --- php7.2/apache/Dockerfile | 3 ++- php7.2/fpm-alpine/Dockerfile | 3 ++- php7.2/fpm/Dockerfile | 3 ++- php7.3/apache/Dockerfile | 3 ++- php7.3/fpm-alpine/Dockerfile | 3 ++- php7.3/fpm/Dockerfile | 3 ++- php7.4/apache/Dockerfile | 3 ++- php7.4/fpm-alpine/Dockerfile | 3 ++- php7.4/fpm/Dockerfile | 3 ++- 9 files changed, 18 insertions(+), 9 deletions(-) diff --git a/php7.2/apache/Dockerfile b/php7.2/apache/Dockerfile index 9805d97563..2e872e8c6c 100644 --- a/php7.2/apache/Dockerfile +++ b/php7.2/apache/Dockerfile @@ -104,8 +104,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \ diff --git a/php7.2/fpm-alpine/Dockerfile b/php7.2/fpm-alpine/Dockerfile index 648bca80e4..a6e3c87f82 100644 --- a/php7.2/fpm-alpine/Dockerfile +++ b/php7.2/fpm-alpine/Dockerfile @@ -80,8 +80,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \ diff --git a/php7.2/fpm/Dockerfile b/php7.2/fpm/Dockerfile index 72a09ca4c6..ec51237950 100644 --- a/php7.2/fpm/Dockerfile +++ b/php7.2/fpm/Dockerfile @@ -85,8 +85,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \ diff --git a/php7.3/apache/Dockerfile b/php7.3/apache/Dockerfile index 48fa56dad8..bb76c5de92 100644 --- a/php7.3/apache/Dockerfile +++ b/php7.3/apache/Dockerfile @@ -105,8 +105,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \ diff --git a/php7.3/fpm-alpine/Dockerfile b/php7.3/fpm-alpine/Dockerfile index 9c1bdfdb10..df6fc8b068 100644 --- a/php7.3/fpm-alpine/Dockerfile +++ b/php7.3/fpm-alpine/Dockerfile @@ -81,8 +81,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \ diff --git a/php7.3/fpm/Dockerfile b/php7.3/fpm/Dockerfile index b99606381a..5480f6f8b0 100644 --- a/php7.3/fpm/Dockerfile +++ b/php7.3/fpm/Dockerfile @@ -86,8 +86,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \ diff --git a/php7.4/apache/Dockerfile b/php7.4/apache/Dockerfile index 8bec01b312..b817b6dfd4 100644 --- a/php7.4/apache/Dockerfile +++ b/php7.4/apache/Dockerfile @@ -105,8 +105,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \ diff --git a/php7.4/fpm-alpine/Dockerfile b/php7.4/fpm-alpine/Dockerfile index 30e8158b93..6469e496e4 100644 --- a/php7.4/fpm-alpine/Dockerfile +++ b/php7.4/fpm-alpine/Dockerfile @@ -81,8 +81,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \ diff --git a/php7.4/fpm/Dockerfile b/php7.4/fpm/Dockerfile index 8eedf3bb7a..a679f89078 100644 --- a/php7.4/fpm/Dockerfile +++ b/php7.4/fpm/Dockerfile @@ -86,8 +86,9 @@ RUN set -ex; \ rm wordpress.tar.gz; \ chown -R www-data:www-data /usr/src/wordpress; \ # pre-create wp-content (and single-level children) for folks who want to bind-mount themes, etc so permissions are pre-created properly instead of root:root +# wp-content/cache: https://github.com/docker-library/wordpress/issues/534#issuecomment-705733507 mkdir wp-content; \ - for dir in /usr/src/wordpress/wp-content/*/; do \ + for dir in /usr/src/wordpress/wp-content/*/ cache; do \ dir="$(basename "${dir%/}")"; \ mkdir "wp-content/$dir"; \ done; \