Skip to content

DRY: single parameterised Dockerfile and matrix CI - #75

Merged
luispabon merged 2 commits into
masterfrom
dry-single-dockerfile
Oct 21, 2026
Merged

luispabon merged 2 commits into
masterfrom
dry-single-dockerfile

Conversation

@luispabon

Copy link
Copy Markdown
Contributor

Replaces the five per-version Dockerfiles with one root Dockerfile driven by PHP_VERSION and UBUNTU build args.

  • One shared overrides.conf (8.2 to 8.5 were identical; 8.1 differed by one comment).
  • php<V>-opcache is installed only for PHP < 8.5; opcache is built into core from 8.5, so 8.6+ needs no change.
  • FPM stage symlinks /usr/sbin/php-fpm to php-fpm<V>, so CMD is ["/usr/sbin/php-fpm", "-O"].
  • Workflow matrix is php x target (cli, fpm) with an include list mapping each version to jammy or noble. Cache scopes are per version and target. PRs build all images but only master pushes.
  • Added .dockerignore; removed php/<ver>/ including stale READMEs.

Not verified locally (no Docker daemon available); CI on this PR is the first real build.

Breaking: docker build php/<ver> no longer works. Use the root context with build args.

@luispabon
luispabon merged commit 70135be into master Oct 21, 2026
5 checks passed
@luispabon
luispabon deleted the dry-single-dockerfile branch October 21, 2026 18: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