Skip to content

Commit 8f5bcc1

Browse files
committed
Add new "wp-config-docker.php" that uses "getenv" for configuration
This new method of configuration allows us to stop modifying the user-supplied `wp-config.php` file on every container startup, and instead just let PHP itself read the values directly from the source. With this change, the "beta" tags are force-reenabled at the same version as the latest releases to allow users to test this before the next release of WordPress (where it is intended that this change will go live for all image variants).
1 parent f6444fd commit 8f5bcc1

24 files changed

+1113
-1333
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/*/**/Dockerfile linguist-generated
22
/*/**/docker-entrypoint.sh linguist-generated
3+
/*/**/wp-config-docker.php linguist-generated
34
/Dockerfile.template linguist-language=Dockerfile

Dockerfile.template

+3
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ RUN set -ex; \
229229

230230
VOLUME /var/www/html
231231

232+
{{ if env.version == "beta" then ( -}}
233+
COPY --chown=www-data:www-data wp-config-docker.php /usr/src/wordpress/
234+
{{ ) else "" end -}}
232235
COPY docker-entrypoint.sh /usr/local/bin/
233236

234237
ENTRYPOINT ["docker-entrypoint.sh"]

apply-templates.sh

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ for version; do
5252

5353
if [ "$version" = 'cli' ]; then
5454
cp -a cli-entrypoint.sh "$dir/docker-entrypoint.sh"
55+
elif [ "$version" = 'beta' ]; then
56+
cp -a docker-entrypoint-ng.sh "$dir/docker-entrypoint.sh"
57+
cp -a wp-config-docker.php "$dir/"
5558
else
5659
cp -a docker-entrypoint.sh "$dir/"
5760
fi

beta/php7.3/apache/Dockerfile

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

beta/php7.3/apache/docker-entrypoint.sh

+28-222
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)