Skip to content

Commit

Permalink
Merge pull request #535 from infosiftr/cache
Browse files Browse the repository at this point in the history
Add wp-content/cache to pre-created directories
  • Loading branch information
tianon authored Oct 8, 2020
2 parents 598769a + 1de7b5a commit 5c66950
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion php7.2/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion php7.2/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion php7.2/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion php7.3/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion php7.3/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion php7.3/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion php7.4/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion php7.4/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion php7.4/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down

0 comments on commit 5c66950

Please sign in to comment.