Repolode
serversideup

serversideup/docker-php

Production-ready PHP Docker images with CLI, FPM, NGINX and FrankenPHP variants for Laravel and WordPress.

Stars
2,536
Forks
206
Open issues
10
Last commit
5 hours ago

What is it?

serversideup/php builds on the official PHP images and fills in what production deployments usually need: it runs as an unprivileged user rather than root, ships Composer and common extensions, and exposes PHP settings through environment variables so you can avoid hand-written configuration files.

Images come in five variations — cli, fpm, fpm-apache, fpm-nginx and frankenphp — covering PHP 8.2 through 8.5 on both Debian and Alpine bases, published to Docker Hub and GitHub Packages. Laravel-specific automation handles database migrations, queues, Horizon and the storage link.

They also include native health checks, S6 Overlay process management, unified logging and Cloudflare support.

Key features

  • 01Runs as an unprivileged user instead of root by default.
  • 02PHP settings such as OPCache and memory limit are configured through environment variables.
  • 03Composer and common PHP extensions are pre-installed.
  • 04Five image variations: cli, fpm, fpm-apache, fpm-nginx and frankenphp.
  • 05Supports PHP 8.2 through 8.5 on Debian and Alpine base images.
  • 06Laravel automation for migrations, queues, Horizon and storage links.
  • 07Native health checks and S6 Overlay process management.
  • 08Unified logging and Cloudflare support.

Use cases

  • Build a production Docker image for a Laravel application.
  • Deploy WordPress or other traditional PHP applications.
  • Run queue workers and cron jobs with the cli variant.
  • Replace an existing PHP image in an Apache or NGINX deployment.
  • Serve long-running PHP apps with the FrankenPHP worker mode.

Topics

FAQ

What is docker-php?
Production-ready PHP Docker images with CLI, FPM, NGINX and FrankenPHP variants for Laravel and WordPress. serversideup/php builds on the official PHP images and fills in what production deployments usually need: it runs as an unprivileged user rather than root, ships Composer and common extensions, and exposes PHP settings through environment variables so you can avoid hand-written configuration files.
Is docker-php free to use? What license does it have?
docker-php is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
Is docker-php still maintained?
Actively maintained. The last commit to docker-php was on Oct 21, 2026.
What can I use docker-php for?
Build a production Docker image for a Laravel application. Deploy WordPress or other traditional PHP applications. Run queue workers and cron jobs with the cli variant. Replace an existing PHP image in an Apache or NGINX deployment. Serve long-running PHP apps with the FrankenPHP worker mode.
Where can I get docker-php?
The source code and installation instructions are on GitHub: https://github.com/serversideup/docker-php

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects