File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,16 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4646 echo >&2 " WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
4747 ( set -x; ls -A; sleep 10 )
4848 fi
49+ WP_CONTENT_EXCLUDE=
50+ if [ -n $NO_WP_CONTENT ]; then
51+ WP_CONTENT_EXCLUDE=" --exclude=./wp-content/* --no-overwrite-dir"
52+ fi
4953 tar --create \
5054 --file - \
5155 --one-file-system \
5256 --directory /usr/src/wordpress \
5357 --owner " $user " --group " $group " \
54- . | tar --extract --file -
58+ . | tar --extract $WP_CONTENT_EXCLUDE --file -
5559 echo >&2 " Complete! WordPress has been successfully copied to $PWD "
5660 if [ ! -e .htaccess ]; then
5761 # NOTE: The "Indexes" option is disabled in the php:apache base image
@@ -122,6 +126,12 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
122126 : " ${WORDPRESS_DB_PASSWORD:= } "
123127 : " ${WORDPRESS_DB_NAME:= wordpress} "
124128
129+ if [ -e wp-config.php ] && [ " ${AUTO_CONFIG:- 0} " == 1 ]; then
130+ exec " $@ "
131+ fi
132+ if [ -e wp-config.php ] && [ ! -w wp-config.php ]; then
133+ exec " $@ "
134+ fi
125135 # version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
126136 # https://github.com/docker-library/wordpress/issues/116
127137 # https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
You can’t perform that action at this time.
0 commit comments