Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial jq-based templating engine #554

Merged
merged 2 commits into from
Jan 7, 2021

Conversation

tianon
Copy link
Member

@tianon tianon commented Dec 31, 2020

See also docker-library/php#1052 (and linked PRs).

This allows us to simplify down to a single Dockerfile.template for all three variations of our generated Dockerfile contents, and it was much simpler to think about/create this by adding support for a beta variant for beta/RC releases (https://wordpress.org/download/releases/#betas). 😅

@tianon
Copy link
Member Author

tianon commented Dec 31, 2020

If I swap the order of the phpVersions in versions.sh (so they match what we currently generate), I can create the following useful diff:

Diff:
$ diff -u <(bashbrew cat wordpress) <(bashbrew cat <(./generate-stackbrew-library.sh))
--- /dev/fd/63	2020-12-30 16:24:08.281527590 -0800
+++ /dev/fd/62	2020-12-30 16:24:08.285527479 -0800
@@ -3,40 +3,40 @@
 
 Tags: 5.6.0-php7.3-apache, 5.6-php7.3-apache, 5-php7.3-apache, php7.3-apache, 5.6.0-php7.3, 5.6-php7.3, 5-php7.3, php7.3
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 5b53a06ca346a2396f2e0373959314c5c9c73e04
-Directory: php7.3/apache
+GitCommit: fe3078d7544bd0bd77e30e1121988234f426dff9
+Directory: latest/php7.3/apache
 
 Tags: 5.6.0-php7.3-fpm, 5.6-php7.3-fpm, 5-php7.3-fpm, php7.3-fpm
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 5b53a06ca346a2396f2e0373959314c5c9c73e04
-Directory: php7.3/fpm
+GitCommit: fe3078d7544bd0bd77e30e1121988234f426dff9
+Directory: latest/php7.3/fpm
 
 Tags: 5.6.0-php7.3-fpm-alpine, 5.6-php7.3-fpm-alpine, 5-php7.3-fpm-alpine, php7.3-fpm-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 5b53a06ca346a2396f2e0373959314c5c9c73e04
-Directory: php7.3/fpm-alpine
+GitCommit: fe3078d7544bd0bd77e30e1121988234f426dff9
+Directory: latest/php7.3/fpm-alpine
 
 Tags: 5.6.0-apache, 5.6-apache, 5-apache, apache, 5.6.0, 5.6, 5, latest, 5.6.0-php7.4-apache, 5.6-php7.4-apache, 5-php7.4-apache, php7.4-apache, 5.6.0-php7.4, 5.6-php7.4, 5-php7.4, php7.4
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 5b53a06ca346a2396f2e0373959314c5c9c73e04
-Directory: php7.4/apache
+GitCommit: fe3078d7544bd0bd77e30e1121988234f426dff9
+Directory: latest/php7.4/apache
 
 Tags: 5.6.0-fpm, 5.6-fpm, 5-fpm, fpm, 5.6.0-php7.4-fpm, 5.6-php7.4-fpm, 5-php7.4-fpm, php7.4-fpm
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 5b53a06ca346a2396f2e0373959314c5c9c73e04
-Directory: php7.4/fpm
+GitCommit: fe3078d7544bd0bd77e30e1121988234f426dff9
+Directory: latest/php7.4/fpm
 
 Tags: 5.6.0-fpm-alpine, 5.6-fpm-alpine, 5-fpm-alpine, fpm-alpine, 5.6.0-php7.4-fpm-alpine, 5.6-php7.4-fpm-alpine, 5-php7.4-fpm-alpine, php7.4-fpm-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 5b53a06ca346a2396f2e0373959314c5c9c73e04
-Directory: php7.4/fpm-alpine
+GitCommit: fe3078d7544bd0bd77e30e1121988234f426dff9
+Directory: latest/php7.4/fpm-alpine
 
 Tags: cli-2.4.0-php7.3, cli-2.4-php7.3, cli-2-php7.3, cli-php7.3
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: c0d11ed412fef07e748a5463041b7be0b5755dd6
-Directory: php7.3/cli
+GitCommit: fe3078d7544bd0bd77e30e1121988234f426dff9
+Directory: cli/php7.3/alpine
 
 Tags: cli-2.4.0, cli-2.4, cli-2, cli, cli-2.4.0-php7.4, cli-2.4-php7.4, cli-2-php7.4, cli-php7.4
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: c0d11ed412fef07e748a5463041b7be0b5755dd6
-Directory: php7.4/cli
+GitCommit: fe3078d7544bd0bd77e30e1121988234f426dff9
+Directory: cli/php7.4/alpine

See https://wordpress.org/support/article/htaccess/ for the latest version of this copy-pasta (not sure how long we've been out of sync).
@tianon tianon requested a review from yosifkit January 5, 2021 20:43
"7.4",
"7.3"
],
"sha1": "db8b75bfc9de27490434b365c12fd805ca6784ce",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, we could also add md5 here -- maybe it's harder to generate a collision for both simultaneously than either separately? 🙈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yosifkit yosifkit merged commit f6444fd into docker-library:master Jan 7, 2021
@yosifkit yosifkit deleted the jq-template branch January 7, 2021 01:28
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Jan 7, 2021
Changes:

- docker-library/wordpress@f6444fd: Merge pull request docker-library/wordpress#554 from infosiftr/jq-template
- docker-library/wordpress@af6cc1c: Move .htaccess to the Dockerfile (and update it)
- docker-library/wordpress@fe3078d: Add initial jq-based templating engine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants