https://github.com/endava/docker-php
This is a docker php (fpm+apache2+nginx unit) image, based on the official alpine/ubuntu packages for php.
https://github.com/endava/docker-php
alpine amd64 apache2 arm64 docker frankenphp nginx-unit php php-fpm ubuntu zts
Last synced: 4 days ago
JSON representation
This is a docker php (fpm+apache2+nginx unit) image, based on the official alpine/ubuntu packages for php.
- Host: GitHub
- URL: https://github.com/endava/docker-php
- Owner: Endava
- License: apache-2.0
- Created: 2022-12-29T13:02:38.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-30T12:49:06.000Z (5 months ago)
- Last Synced: 2025-07-22T02:54:27.698Z (3 months ago)
- Topics: alpine, amd64, apache2, arm64, docker, frankenphp, nginx-unit, php, php-fpm, ubuntu, zts
- Homepage: https://hub.docker.com/r/endava/php
- Size: 777 KB
- Stars: 17
- Watchers: 9
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# endava/docker-php
This is a docker php image is based on an alpine (and ubuntu) distribution including some tools and php extensions. You can find more details at the respective release pages on github.
# Supported Versions
| Version | Branch | Latest Release | Status | Vulnerability Report | Fitness Functions |
| --- | --- | --- | --- | --- | --- |
| **8.4** | [release/8.4](https://github.com/endava/docker-php/tree/release/8.4) | [![Size][size_84_badge]][release_84_link] | [![Build Status][github_actions_84_badge]][github_actions_84_link] | [![Security Report][security_report_84_badge]][security_report_84_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.4.yml)
| **8.3** | [release/8.3](https://github.com/endava/docker-php/tree/release/8.3) | [![Size][size_83_badge]][release_83_link] | [![Build Status][github_actions_83_badge]][github_actions_83_link] | [![Security Report][security_report_83_badge]][security_report_83_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.3.yml)
| **8.2** | [release/8.2](https://github.com/endava/docker-php/tree/release/8.2) | [![Size][size_82_badge]][release_82_link] | [![Build Status][github_actions_82_badge]][github_actions_82_link] | [![Security Report][security_report_82_badge]][security_report_82_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.2.yml)
| **8.1** | [release/8.1](https://github.com/endava/docker-php/tree/release/8.1) | [![Size][size_81_badge]][release_81_link] | [![Build Status][github_actions_81_badge]][github_actions_81_link] | [![Security Report][security_report_81_badge]][security_report_81_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.1.yml)[github_actions_84_badge]: https://github.com/Endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release%2F8.4
[github_actions_84_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.4
[release_84_link]: https://github.com/endava/docker-php/releases/tag/8.4.5
[security_report_84_badge]: https://github.com/endava/docker-php/releases/download/8.4.5/vulnerability-status.png
[security_report_84_link]: https://github.com/endava/docker-php/releases/download/8.4.5/vulnerability-report.html
[size_84_badge]: https://github.com/endava/docker-php/releases/download/8.4.5/size-status.png[github_actions_83_badge]: https://github.com/Endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release%2F8.3
[github_actions_83_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.3
[release_83_link]: https://github.com/endava/docker-php/releases/tag/8.3.18
[security_report_83_badge]: https://github.com/endava/docker-php/releases/download/8.3.18/vulnerability-status.png
[security_report_83_link]: https://github.com/endava/docker-php/releases/download/8.3.18/vulnerability-report.html
[size_83_badge]: https://github.com/endava/docker-php/releases/download/8.3.18/size-status.png[github_actions_82_badge]: https://github.com/Endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release%2F8.2
[github_actions_82_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.2
[release_82_link]: https://github.com/endava/docker-php/releases/tag/8.2.28
[security_report_82_badge]: https://github.com/endava/docker-php/releases/download/8.2.28/vulnerability-status.png
[security_report_82_link]: https://github.com/endava/docker-php/releases/download/8.2.28/vulnerability-report.html
[size_82_badge]: https://github.com/endava/docker-php/releases/download/8.2.28/size-status.png[github_actions_81_badge]: https://github.com/Endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release%2F8.1
[github_actions_81_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.1
[release_81_link]: https://github.com/endava/docker-php/releases/tag/8.1.32
[security_report_81_badge]: https://github.com/endava/docker-php/releases/download/8.1.32/vulnerability-status.png
[security_report_81_link]: https://github.com/endava/docker-php/releases/download/8.1.32/vulnerability-report.html
[size_81_badge]: https://github.com/endava/docker-php/releases/download/8.1.32/size-status.png# Experimental Versions
| Version | Branch | Latest Release | Status | Vulnerability Report | Fitness Functions |
| --- | --- | --- | --- | --- | --- |
| **8.4 (ZTS)** | [release/8.4-zts](https://github.com/endava/docker-php/tree/release/8.4-zts) | [![Size][size_84zts_badge]][release_84zts_link] | [![Build Status][github_actions_84zts_badge]][github_actions_84zts_link] | [![Security Report][security_report_84zts_badge]][security_report_84zts_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.4-zts.yml)
| **8.3 (ZTS)** | [release/8.3-zts](https://github.com/endava/docker-php/tree/release/8.3-zts) | [![Size][size_83zts_badge]][release_83zts_link] | [![Build Status][github_actions_83zts_badge]][github_actions_83zts_link] | [![Security Report][security_report_83zts_badge]][security_report_83zts_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.3-zts.yml)
| **8.2 (ZTS)** | [release/8.2-zts](https://github.com/endava/docker-php/tree/release/8.2-zts) | [![Size][size_82zts_badge]][release_82zts_link] | [![Build Status][github_actions_82zts_badge]][github_actions_82zts_link] | [![Security Report][security_report_82zts_badge]][security_report_82zts_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.2-zts.yml)
| **8.4 (Ubuntu)** | [release/8.4-ubuntu](https://github.com/endava/docker-php/tree/release/8.4-ubuntu) | [![Size][size_84ubuntu_badge]][release_84ubuntu_link] | [![Build Status][github_actions_84ubuntu_badge]][github_actions_84ubuntu_link] | [![Security Report][security_report_84ubuntu_badge]][security_report_84ubuntu_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.4-ubuntu.yml)
| **8.3 (Ubuntu)** | [release/8.3-ubuntu](https://github.com/endava/docker-php/tree/release/8.3-ubuntu) | [![Size][size_83ubuntu_badge]][release_83ubuntu_link] | [![Build Status][github_actions_83ubuntu_badge]][github_actions_83ubuntu_link] | [![Security Report][security_report_83ubuntu_badge]][security_report_83ubuntu_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.3-ubuntu.yml)
| **8.2 (Ubuntu)** | [release/8.2-ubuntu](https://github.com/endava/docker-php/tree/release/8.2-ubuntu) | [![Size][size_82ubuntu_badge]][release_82ubuntu_link] | [![Build Status][github_actions_82ubuntu_badge]][github_actions_82ubuntu_link] | [![Security Report][security_report_82ubuntu_badge]][security_report_82ubuntu_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.2-ubuntu.yml)
| **8.1 (Ubuntu)** | [release/8.1-ubuntu](https://github.com/endava/docker-php/tree/release/8.1-ubuntu) | [![Size][size_81ubuntu_badge]][release_81ubuntu_link] | [![Build Status][github_actions_81ubuntu_badge]][github_actions_81ubuntu_link] | [![Security Report][security_report_81ubuntu_badge]][security_report_81ubuntu_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.1-ubuntu.yml)[github_actions_81ubuntu_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.1-ubuntu
[github_actions_81ubuntu_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.1-ubuntu
[release_81ubuntu_link]: https://github.com/endava/docker-php/releases/tag/8.1.31-ubuntu
[security_report_81ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.1.31-ubuntu/vulnerability-status.png
[security_report_81ubuntu_link]: https://github.com/endava/docker-php/releases/download/8.1.31-ubuntu/vulnerability-report.html
[size_81ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.1.31-ubuntu/size-status.png[github_actions_82ubuntu_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.2-ubuntu
[github_actions_82ubuntu_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.2-ubuntu
[release_82ubuntu_link]: https://github.com/endava/docker-php/releases/tag/8.2.27-ubuntu
[security_report_82ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.2.27-ubuntu/vulnerability-status.png
[security_report_82ubuntu_link]: https://github.com/endava/docker-php/releases/download/8.2.27-ubuntu/vulnerability-report.html
[size_82ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.2.27-ubuntu/size-status.png[github_actions_83ubuntu_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.3-ubuntu
[github_actions_83ubuntu_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.3-ubuntu
[release_83ubuntu_link]: https://github.com/endava/docker-php/releases/tag/8.3.17-ubuntu
[security_report_83ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.3.17-ubuntu/vulnerability-status.png
[security_report_83ubuntu_link]: https://github.com/endava/docker-php/releases/download/8.3.17-ubuntu/vulnerability-report.html
[size_83ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.3.17-ubuntu/size-status.png[github_actions_84ubuntu_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.4-ubuntu
[github_actions_84ubuntu_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.4-ubuntu
[release_84ubuntu_link]: https://github.com/endava/docker-php/releases/tag/8.4.4-ubuntu
[security_report_84ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.4.4-ubuntu/vulnerability-status.png
[security_report_84ubuntu_link]: https://github.com/endava/docker-php/releases/download/8.4.4-ubuntu/vulnerability-report.html
[size_84ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.4.4-ubuntu/size-status.png[github_actions_82zts_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.2-zts
[github_actions_82zts_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.2-zts
[release_82zts_link]: https://github.com/endava/docker-php/releases/tag/8.2.27-zts
[security_report_82zts_badge]: https://github.com/endava/docker-php/releases/download/8.2.27-zts/vulnerability-status.png
[security_report_82zts_link]: https://github.com/endava/docker-php/releases/download/8.2.27-zts/vulnerability-report.html
[size_82zts_badge]: https://github.com/endava/docker-php/releases/download/8.2.27-zts/size-status.png[github_actions_83zts_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.3-zts
[github_actions_83zts_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.3-zts
[release_83zts_link]: https://github.com/endava/docker-php/releases/tag/8.3.17-zts
[security_report_83zts_badge]: https://github.com/endava/docker-php/releases/download/8.3.17-zts/vulnerability-status.png
[security_report_83zts_link]: https://github.com/endava/docker-php/releases/download/8.3.17-zts/vulnerability-report.html
[size_83zts_badge]: https://github.com/endava/docker-php/releases/download/8.3.17-zts/size-status.png[github_actions_84zts_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.4-zts
[github_actions_84zts_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.4-zts
[release_84zts_link]: https://github.com/endava/docker-php/releases/tag/8.4.4-zts
[security_report_84zts_badge]: https://github.com/endava/docker-php/releases/download/8.4.4-zts/vulnerability-status.png
[security_report_84zts_link]: https://github.com/endava/docker-php/releases/download/8.4.4-zts/vulnerability-report.html
[size_84zts_badge]: https://github.com/endava/docker-php/releases/download/8.4.4-zts/size-status.png# Unsupported Versions
Unsupported as of php's eol list at https://www.php.net/eol.php
| Version | Branch | Latest Release | Status | Vulnerability Report |
| --- | --- | --- | --- | --- |
| **8.0** | [release/8.0](https://github.com/endava/docker-php/tree/release/8.0) | [![Size][size_80_badge]](https://github.com/endava/docker-php/releases/tag/8.0.30) | [![Build Status][github_actions_80_badge]][github_actions_80_link] | [![Security Report][security_report_80_badge]][security_report_80_link][github_actions_80_badge]: https://github.com/Endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release%2F8.0
[github_actions_80_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.0
[security_report_80_badge]: https://github.com/endava/docker-php/releases/download/8.0.30/vulnerability-status.png
[security_report_80_link]: https://github.com/endava/docker-php/releases/download/8.0.30/vulnerability-report.html
[size_80_badge]: https://github.com/endava/docker-php/releases/download/8.0.30/size-status.png# Overview
This is the successor of the deprecated [exozet/php-fpm](https://hub.docker.com/r/exozet/php-fpm/) docker image. We collected ideas on how a new (including breaking changes) version of our heavily used php-fpm image could look like.
We figured that our old approach had some disadvantages (it was a php-fpm build based on [official docker php images](https://hub.docker.com/_/php)):
* it is based on a source build from php, so we could not use any packages from alpine/debian to speed up the build time
* there are differences between the php package on debian/alpine
* there is no official alpine apache2 build
* we cannot add nginx unit to alpine build, as it lacks php embed SAPI [comment on php!1355](https://github.com/docker-library/php/pull/1355#issuecomment-1352087633)
* the non-alpine image has lots of (fixable) CVEs, we cannot fix (e.g. trivy image --ignore-unfixed php:8.1.13-fpm-buster says: Total: 23)
* depends on what the docker library team thinks fits into a docker image for php, it is not the php team releasing itThe new approach has some advantages:
* It uses the latest package distributed by alpine team/community (which is pretty fast when it comes to security updates - 1 or 2 days after release) and official ubuntu packages
* The precompiled packages (e.g. xdebug) are very fast installed
* No need for custom scripts like [docker-php-ext-install](https://github.com/docker-library/php/blob/master/docker-php-ext-install)
* It ships with httpd binary (for apache2), unitd binary (for nginx unit) and php-fpm binary (for php fpm) to execute php web requests
* For apache2 and nginx unit variants an external webserver (like nginx) is not necessary anymore
* It ships linux/arm64/v8 and linux/amd64 version of the image
* The web server and the web requests are executed as non-privileged user www-data
* The github release notes (including tool versions and php extension versions) is automatically generated if a commit is tagged
* The release is available only as endava/php:8.1.16 (no suffix for -root, -xdebug -alpine or -sudo or others)
* The CI/CD pipeline includes tests to validate the image as nginx unit or apache2 delivery
* The CI/CD pipeline only builds the latest version (if necessary we can git checkout -b 8.1.13 if you really want to fix something in a release)The new approach has a disadvantage:
* We depend on the release of php packages at alpine and ubuntu (e.g. on 2023/01/03 the php82 was not officially packaged on alpine including nginx unit - so we cannot support it. at the same time it is available as docker image on official docker php). If the packaged package version number is not available on alpine anymore - we cannot recreate the docker image (we have a workaround to build older apk's for it - takes more time, but is 100% viable solution!)
# Contributing
Please refer to [CONTRIBUTING.md](CONTRIBUTING.md).# License
Please refer to [LICENSE](LICENSE).