Skip to content

Record the Apache package version of the -apache images - #270

Merged
csandanov merged 1 commit into
masterfrom
feature/apache-package-version
Nov 15, 2026
Merged

csandanov merged 1 commit into
masterfrom
feature/apache-package-version

Conversation

@csandanov

@csandanov csandanov commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Problem

The -apache images can fall behind on Apache security fixes. Today 8.5-apache still 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 -apache image 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 -dev images, tags and Apache configuration are the same.

Details

  • apache-packages.mk records the minimum Alpine apache2 package version per PHP version, currently 2.4.71-r0 for all four.
  • 8/Makefile passes it as APACHE_PACKAGE_VERSION when PHP_WEB=apache, and stops before building a PHP version that has no recorded version.
  • 8/Dockerfile installs apache2>=… and apache2-proxy>=…, so an outdated package mirror fails the build instead of shipping an older Apache.
  • README notes where Apache comes from and when the images are rebuilt.
  • Merging this rebuilds the floating -apache tags with Apache 2.4.71. Revision tags already have it since r15, but floating tags are only published from master.

The updater side is in wodby/images#69. Merge this pull request first. The updater skips repositories that don't have apache-packages.mk yet, so either order is safe, but this order avoids a day of skipped checks.

Validation

  • make -n for PHP_WEB=apache passes APACHE_PACKAGE_VERSION=2.4.71-r0, the plain variant gets no Apache argument, and an unsupported PHP version stops with a clear error.
  • In the pinned php:8.5.12-fpm-alpine base, apk add "apache2>=2.4.71-r0" "apache2-proxy>=2.4.71-r0" succeeds and apache2>=2.4.72-r0 fails.
  • Image builds and the Apache tests run in this pull request's CI.

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.
@csandanov
csandanov merged commit c23167b into master Nov 15, 2026
36 checks passed
@csandanov
csandanov deleted the feature/apache-package-version branch November 15, 2026 06:55
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.

1 participant