Skip to content

feat: publish compiled PHP FPM artifacts for Alpine consumers - #256

Draft
Soner (shyim) wants to merge 2 commits into
mainfrom
feat/reuse-compiled-php-artifacts
Draft

Soner (shyim) wants to merge 2 commits into
mainfrom
feat/reuse-compiled-php-artifacts

Conversation

@shyim

@shyim Soner (shyim) commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Build and publish our own compiled PHP-FPM image to make PHP updates independent of docker-library/php image releases and speed up downstream builds. The PHP build recipe and helper scripts live in this repository. PHP releases are downloaded directly from php.net and verified against their SHA-256 checksums and release signatures.

Depending images start directly from Alpine, install current APK runtime packages, and copy in the compiled PHP files. PHP and extensions are compiled only when their build inputs change, so daily downstream rebuilds can refresh OS packages without repeating that compilation across image variants.

This first step adds the standalone build under php-fpm/:

  • Publish a scratch image containing /usr/local, the PHP source archive, an APK runtime dependency manifest, and PHP/Alpine version metadata.
  • Publish PHP 8.2–8.5 minor and patch tags under ghcr.io/shopware/docker-php-fpm for AMD64 and ARM64.
  • Include the production extensions plus disabled gRPC, OpenTelemetry, Xdebug, Tideways, Blackfire and SPX. Runtime dependency scanning covers disabled extensions too.
  • Build on changes to the PHP inputs or recipe, with manual workflow runs available.
  • Keep existing v1 images on their current bases. Adoption in v1 and future image generations is a follow-up; downstream build savings start with that adoption.

See the consumption guide for the Alpine-based Dockerfile example, dependency installation, copying compiled files, image tags, configuration and optional extension activation. The build instructions cover local compilation and authentication.

Validation: built PHP 8.4 and 8.5 artifacts locally on ARM64, then built separate Alpine consumers using the documented Dockerfile. Runtime checks passed for PHP/extensions, optional extension activation, FPM configuration, shared-library resolution and source helpers. Bake plans, workflow lint and whitespace checks passed. Build-time improvements have not yet been benchmarked.

@shyim
Soner (shyim) force-pushed the feat/reuse-compiled-php-artifacts branch from 81ccffb to f3f93de Compare October 27, 2026 07:37
@shyim Soner (shyim) changed the title feat: reuse compiled PHP artifacts for daily images feat: add standalone PHP FPM base with bundled extensions Oct 27, 2026
@shyim
Soner (shyim) force-pushed the feat/reuse-compiled-php-artifacts branch from f3f93de to 52720f1 Compare October 27, 2026 07:48
@shyim Soner (shyim) changed the title feat: add standalone PHP FPM base with bundled extensions feat: publish compiled PHP FPM artifacts for Alpine consumers Oct 27, 2026
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