Submit your pull requests to the v5 branch.
The Dockerfile.* files, docker-bake.hcl and README.md are generated from the templates of the utils directory
with Orbit: edit utils/Dockerfile.*.blueprint, utils/docker-bake.blueprint.hcl
or utils/README.blueprint.md, then run:
$ make blueprintThe pages of the docs directory are not generated: edit them directly.
The images of a PHP version share their first layers (see utils/docker-bake.blueprint.hcl):
Dockerfile.base: the layers common to all the images;Dockerfile.slim.<variant>: the slim image of the variant, built onDockerfile.base;Dockerfile.extensions: the extensions, installed once for the 3 variants onDockerfile.base;Dockerfile.<variant>: the fat image, built onDockerfile.slim.<variant>applied onDockerfile.extensions;Dockerfile.<variant>.node: the node images, built on the fat image.
The tests use bash_unit (see the test suite). Build and test a PHP version (cli, apache and fpm variants):
$ make test-8.4make test-quick builds and tests the cli variant of the maintained PHP versions, without NodeJS.
To test images already built, run the test suite directly:
$ PHP_VERSION=8.4 BRANCH=v5 VARIANT=apache ./tests-suite/bash_unit -f tap ./tests-suite/*.shTo run the test files of several variants in parallel, as the CI does (TEST_JOBS test files at the same time, 2 by
default, with one log per test file):
$ PHP_VERSION=8.4 BRANCH=v5 VARIANTS="apache cli fpm" NODE_VERSIONS="22 24 26" ./tests-suite/run_tests.shThe variables of tests-suite/config select the images to test, e.g. TAG_PREFIX (images
built with TAG_PREFIX=mytest- docker buildx bake ...) or PLATFORM (e.g. linux/arm64 with QEMU).
Apple Silicon: the file system of macOS manages the users and permissions differently: the permission tests of
a linux/arm64 image can fail on a Mac, while the images work as expected. Run the tests in a linux/arm64 virtual
machine instead.
Non-maintained versions: PHP 7.4, 8.0 and 8.1 (all their images) and NodeJS 18 and 20 (-legacy-node bake
groups of the maintained PHP versions) are built and tested by the legacy-v5.yml workflow, started manually.
utils/README.blueprint.md: the version lists of the "Images" sectionutils/docker-bake.blueprint.hcl: the build targets.github/workflows/workflow.yml(maintained versions) or.github/workflows/legacy-v5.yml(non-maintained versions): the CI matrixextensions/<PHP version>: the extensions available for this PHP version