PHP Module definitions
This documentation describes how to create new or alter existing PHP module definitions.
All PHP modules/extensions (for all PHP versions and both for amd64 and arm64 platforms) are defined in here in their dedicated directory. These definitions are then transformed to Ansible group_vars and afterwards Ansible will generate the corresponding Dockerfiles (Stage: mods).
How to add PHP modules?
-
Inside
php_modules/directory:- Create a new directory with the name of the PHP module in
php_modules/ - Add
build.yml,options.ymlandtest.ymlinto your newly created directory - Alter
build.yml,options.ymlandtest.ymlaccording to documentation below - Run
python3 modules-validate.pyto validate the created PHP module definitions - Run
python3 modules-generate.pyto create Ansible group_vars
- Create a new directory with the name of the PHP module in
-
Inside the root of this git repository:
- Run
make gen-dockerfilesto generate Dockerfiles via Ansible - Run
make build STAGE=mods VERSION=8.1 ARCH=linux/amd64to build themodsDocker image with version8.1for platformlinux/amd64
- Run
Note: If you want to test if your new module builds correctly, you can generate Dockerfiles which only contain your module and all others removed. This allows for much faster Docker builds and you don't have to wait for all other modules to be built. To do so you generate group_vars for your module only via:
# Only generate group_vars for curl
# Note: if curl has other modules as requiredments to be built beforehand, those will also be added
python3 module-generate.py curl
Extension definition: build.yml
See README-build.yml.md how to alter the build.yml file.
Extension definition: options.yml
See README-options.yml.md how to alter the options.yml file.
Extension definition: test.yml
See README-test.yml.md how to alter the test.yml file.