Repository navigation
Record the Apache package version of the -apache images - #270
Merged
Merged
Conversation
The -apache images install Alpine's apache2 package, which the PHP base images do not contain, so base image digest updates do not follow Apache releases. apache-packages.mk now records the minimum apache2 version for each PHP version. The image updater bumps it when Alpine publishes a newer package, and that commit rebuilds the images. Builds require at least the recorded version, so an outdated package mirror fails the build instead of shipping an older Apache. Builds of a PHP version without a recorded version fail before starting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
-apacheimages can fall behind on Apache security fixes. Today8.5-apachestill runs Apache 2.4.69, while Alpine Linux already ships 2.4.71.Cause
Apache in these images comes from Alpine Linux's package repository, not from the official PHP images we build on. The images are rebuilt automatically only when the official PHP images change. A new Apache package on its own never started a rebuild, so it reached the images only when an unrelated PHP image update happened to come along.
Solution
The repository now keeps a small file with the Apache version each
-apacheimage should have. The image update automation will raise that version when Alpine publishes a newer Apache package, and the change rebuilds and releases the images like any other update. Builds also refuse to install an Apache older than the recorded version.Nothing else changes: the plain and
-devimages, tags and Apache configuration are the same.Details
apache-packages.mkrecords the minimum Alpineapache2package version per PHP version, currently2.4.71-r0for all four.8/Makefilepasses it asAPACHE_PACKAGE_VERSIONwhenPHP_WEB=apache, and stops before building a PHP version that has no recorded version.8/Dockerfileinstallsapache2>=…andapache2-proxy>=…, so an outdated package mirror fails the build instead of shipping an older Apache.-apachetags with Apache 2.4.71. Revision tags already have it sincer15, but floating tags are only published frommaster.The updater side is in wodby/images#69. Merge this pull request first. The updater skips repositories that don't have
apache-packages.mkyet, so either order is safe, but this order avoids a day of skipped checks.Validation
make -nforPHP_WEB=apachepassesAPACHE_PACKAGE_VERSION=2.4.71-r0, the plain variant gets no Apache argument, and an unsupported PHP version stops with a clear error.php:8.5.12-fpm-alpinebase,apk add "apache2>=2.4.71-r0" "apache2-proxy>=2.4.71-r0"succeeds andapache2>=2.4.72-r0fails.