File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,16 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
46
46
echo >&2 " WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47
47
( set -x; ls -A; sleep 10 )
48
48
fi
49
+ WP_CONTENT_EXCLUDE=
50
+ if [ -n $NO_WP_CONTENT ]; then
51
+ WP_CONTENT_EXCLUDE=" --exclude=./wp-content/*"
52
+ fi
49
53
tar --create \
50
54
--file - \
51
55
--one-file-system \
52
56
--directory /usr/src/wordpress \
53
57
--owner " $user " --group " $group " \
54
- . | tar --extract --file -
58
+ . | tar --extract $WP_CONTENT_EXCLUDE --file -
55
59
echo >&2 " Complete! WordPress has been successfully copied to $PWD "
56
60
if [ ! -e .htaccess ]; then
57
61
# NOTE: The "Indexes" option is disabled in the php:apache base image
@@ -122,6 +126,9 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
122
126
: " ${WORDPRESS_DB_PASSWORD:= } "
123
127
: " ${WORDPRESS_DB_NAME:= wordpress} "
124
128
129
+ if [ -e wp-config.php && -n $NO_AUTO_CONFIG ]; then
130
+ exec " $@ "
131
+ fi
125
132
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
126
133
# https://github.com/docker-library/wordpress/issues/116
127
134
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
You can’t perform that action at this time.
0 commit comments