This repository contains a Docker image for running high-performance PHP web applications. It is optimized for speed, efficiency, and includes a comprehensive set of tools and libraries commonly used in web development.
If you identify a security breach, please report it as soon as possible under the guidelines outlined in our security policy.
- Alpine Linux 3.20: Minimal base for better security and smaller footprint.
- PHP 8.3: Modern version with performance improvements and extended support timeline.
- Nginx: Fast and reliable web server.
- Runit: Lightweight init system for process supervision.
- Multi-arch builds: Supports linux/amd64 and linux/arm64.
This image is:
- ✅ Signed with Sigstore Cosign
- ✅ Provenance generated in the SLSA v0.2
- ✅ Compatible with verification using
cosign verify
andcosign verify-attestation
To verify the image and its provenance (example):
cosign verify \
--certificate-identity-regexp "github.com/fontebasso/.+" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
docker.io/fontebasso/php-nginx@sha256:03c339da2342dd29c04a4c20da486150efc38f93a3aaf675fdf7a08899d8cb56
cosign verify-attestation \
--type=https://slsa.dev/provenance/v0.2 \
--certificate-identity-regexp "github.com/slsa-framework/.+" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
docker.io/fontebasso/php-nginx@sha256:03c339da2342dd29c04a4c20da486150efc38f93a3aaf675fdf7a08899d8cb56
No manual setup or keys required — Cosign uses GitHub Actions identity.
- Docker installed on your machine.
- Docker Hub account for pulling the image.
To pull the image from Docker Hub, run:
docker pull fontebasso/php-nginx:latest
To run a container using this image, execute:
docker run -d -p 8080:80 fontebasso/php-nginx:latest
This will expose Nginx on port 8080 of your local machine.
You can customize the PHP configuration by editing the custom_params.ini file and copying it to the appropriate directory:
COPY ./custom_params.ini /opt/php/etc/php/conf.d/php-04-custom-params.ini
/app
: The application code./env
: Environment variables directory./etc/service
: Runit service definitions.
To build the Docker image locally, clone this repository and run:
git clone https://github.com/fontebasso/docker-php-nginx.git
cd docker-php-nginx
docker build -t fontebasso/php-nginx:latest .
This repository is configured to build for:
linux/amd64
linux/arm64
Via GitHub Actions with provenance and public signing.
Pull requests are welcome! Please fork the repository and submit your improvements.
We follow standard open-source contribution guidelines, and are happy to receive help improving this project.
For questions or support, please open an issue or contact the maintainers.
This project is licensed under the MIT License. See the LICENSE file for details.