We provide images which extend the official PHP-Images. We add additional stuff like:
- almost any PHP module preinstalled
- configuration based on ENV variables
- run multiple services (like php-fpm and nginx) with supervisord
Automated build and test running on Gitlab CI (GitLab.com CI custom Google Cloud runner) sponsored by Onedrop GmbH & Co. KG.
Or write an issue in our GitHub repository.
Or join our discord https://discord.gg/BpBZtXAgJz
The general build process is currently a mixture of python jinja2 legacy and PHP.
First we build the files inside the docker directory using this command:
docker run --rm -ti -v $PWD:/app -w /app webdevops/dockerfile-build-env make provision
It will use the Jinja2 templates inside of the template directory and the
config files from the provisioning directory.
The files in the docker directory are never modified manually
This will be replaced with PHP twig templates in the future to streamline everything.
We generate a multi stage Gitlab-CI configuration using PHP:
docker run --rm -ti -v $PWD:/app -w /app/ci webdevops/php:8.4-alpine composer install
docker run --rm -ti -v $PWD:/app -w /app webdevops/php:8.4-alpine ci/console github:generate
Gitlab CI builds every image independent and runs serverspec and structure tests on every image before pushing them to the registry.
PHP images require Docker BuildKit. The official ghcr.io/php/pie:bin image
supplies PIE through a build-only mount; the existing INI configuration still
controls extension loading. PIE requests remain unpinned, and compilation uses
nproc parallel jobs.
Protobuf, Vips and XML-RPC are built directly from their official upstream sources. The existing XML-RPC 1.0.0RC3 pin is preserved on all supported PHP versions. Protobuf on PHP 8.2–8.5 uses the latest upstream release. If a future release raises its minimum PHP version, older PHP image builds can fail; there is no automatic fallback to an older release. The existing CI matrix checks compatibility across PHP versions.
The native Vips extension is deprecated and no longer maintained upstream. It is
retained for existing applications, using the upstream default branch (currently
master): GitHub tags predate the PECL 1.0.13 release and would downgrade the
extension. This includes changes beyond the last PECL release.
No extension installation needs pecl.php.net; Serverspec and container structure
tests retain their existing image matrix.
As in many projects the documentation is kind of up to date 😅.
- Old version of the documentation is available on readthedocs
- New version is currently being written on gitbook
The following images which are currently supported are based on php:{VER}-fpm-buster.
webdevops/php:8.2webdevops/php:8.3webdevops/php:8.4webdevops/php:8.5webdevops/php-dev:8.2webdevops/php-dev:8.3webdevops/php-dev:8.4webdevops/php-dev:8.5webdevops/php-apache:8.2webdevops/php-apache:8.3webdevops/php-apache:8.4webdevops/php-apache:8.5webdevops/php-apache-dev:8.2webdevops/php-apache-dev:8.3webdevops/php-apache-dev:8.4webdevops/php-apache-dev:8.5webdevops/php-nginx:8.2webdevops/php-nginx:8.3webdevops/php-nginx:8.4webdevops/php-nginx:8.5webdevops/php-nginx-dev:8.2webdevops/php-nginx-dev:8.3webdevops/php-nginx-dev:8.4webdevops/php-nginx-dev:8.5
The following images which are currently supported are based on php:{VER}-fpm-alpine.
webdevops/php:8.2-alpinewebdevops/php:8.3-alpinewebdevops/php:8.4-alpinewebdevops/php:8.5-alpinewebdevops/php-dev:8.2-alpinewebdevops/php-dev:8.3-alpinewebdevops/php-dev:8.4-alpinewebdevops/php-dev:8.5-alpinewebdevops/php-apache:8.2-alpinewebdevops/php-apache:8.3-alpinewebdevops/php-apache:8.4-alpinewebdevops/php-apache:8.5-alpinewebdevops/php-apache-dev:8.2-alpinewebdevops/php-apache-dev:8.3-alpinewebdevops/php-apache-dev:8.4-alpinewebdevops/php-apache-dev:8.5-alpinewebdevops/php-nginx:8.2-alpinewebdevops/php-nginx:8.3-alpinewebdevops/php-nginx:8.4-alpinewebdevops/php-nginx:8.5-alpinewebdevops/php-nginx-dev:8.2-alpinewebdevops/php-nginx-dev:8.3-alpinewebdevops/php-nginx-dev:8.4-alpinewebdevops/php-nginx-dev:8.5-alpine
