Production-ready PHP Docker images built on official PHP. Optimized for Laravel, WordPress, and modern PHP applications.
serversideup/php takes the official PHP Docker images and adds everything you need for real-world production use:
- β Secure by Default - Runs as unprivileged user, not root
- β Zero Config Required - Production-ready defaults, customize with environment variables
- β Batteries Included - Composer, common extensions, and helpful utilities pre-installed
- β Framework Optimized - Special automations for Laravel (migrations, queues, Horizon, etc.)
- β Multiple Variations - CLI, FPM, FPM+NGINX, FPM+Apache, FrankenPHP
- β Modern Architecture - Native health checks, S6 Overlay, unified logging
Features
![]() |
![]() |
![]() |
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Want to see how easy it is? Our installation guide walks you through creating your first PHP app with Docker:
- β
Run
phpinfo()in your browser - β Upgrade PHP versions by changing one line
- β Switch between variations (FPM, FrankenPHP, etc.)
- β See environment variables in action
π Follow the quick start guide
Here's what a complete Laravel setup with NGINX + PHP 8.5 looks like:
services:
php:
image: serversideup/php:8.5-fpm-nginx
ports:
- "80:8080"
environment:
# Customize PHP with environment variables
PHP_OPCACHE_ENABLE: "1"
PHP_MEMORY_LIMIT: "512M"
# Laravel automations (migrations, storage link, etc.)
AUTORUN_ENABLED: "true"
volumes:
- .:/var/www/htmlThat's it. No complex configs. Just environment variables.
Ready to try it? Get started with our tutorial β
Choose the variation that fits your needs. All images follow the pattern:
serversideup/php:{{version}}-{{variation-name}}
| Variation | Best For | Example |
|---|---|---|
| cli | CLI scripts, cron jobs, queues | serversideup/php:8.5-cli |
| fpm | Custom web server setup | serversideup/php:8.5-fpm |
| fpm-apache | Apache-based deployments | serversideup/php:8.5-fpm-apache |
| fpm-nginx | Stable and performant web server | serversideup/php:8.5-fpm-nginx |
| frankenphp | Modern, high-performance apps with worker mode | serversideup/php:8.5-frankenphp |
Note
All images are available on Docker Hub and GitHub Packages.
We support PHP 7.4 through 8.5 with both Debian and Alpine base images.
Learn More About Choosing an Image β
| βοΈ Variation | π Version |
|---|---|
| cli | Debian Based Alpine Based |
| fpm | Debian Based Alpine Based |
| fpm-apache | Debian Based |
| fpm-nginx | Debian Based Alpine Based |
| frankenphp | Debian Based Alpine Based |
| unit (deprecated) |
Need help integrating Docker with your PHP application?
- Managed Hosting - CI/CD design, managed hosting, guaranteed uptime
- One-time Session - Video + screen-sharing with core contributors
- Complete Development Team - Get help from hardware to pixel and everything in between.
- Website overview of the product.
- Docs for a deep-dive on how to use the product.
- Discord for friendly support from the community and the team.
- GitHub for source code, bug reports, and project management.
- Get Professional Help - Get video + screen-sharing help directly from the core contributors.
As an open-source project, we strive for transparency and collaboration in our development process. We greatly appreciate any contributions members of our community can provide. Whether you're fixing bugs, proposing features, improving documentation, or spreading awareness - your involvement strengthens the project. Please review our contribution guidelines and code of conduct to understand how we work together respectfully.
- Bug Report: If you're experiencing an issue while using these images, please create an issue.
- Feature Request: Make this project better by submitting a feature request.
- Documentation: Improve our documentation by submitting a documentation change.
- Community Support: Help others on GitHub Discussions or Discord.
- Security Report: Report critical security issues via our responsible disclosure policy.
Need help getting started? Join our Discord community and we'll help you out!
All of our software is free and open to the world. None of this can be brought to you without the financial backing of our sponsors.
No bronze sponsors yet. Become a sponsor βThis project requires significant computing power to build and maintain over 8,000 different Docker image tags. We're extremely grateful for the following sponsors:
Β Β
We're Dan and Jay - a two-person team with a passion for open source products. We created Server Side Up to help share what we learn.
- π Blog - Get the latest guides and free courses on all things web/mobile development.
- π Community - Get friendly help from our community members.
- π€΅ββοΈ Get Professional Help - Get video + screen-sharing support from the core contributors.
- π» GitHub - Check out our other open source projects.
- π« Newsletter - Skip the algorithms and get quality content right to your inbox.
- π₯ Twitter - You can also follow Dan and Jay.
- β€οΈ Sponsor Us - Please consider sponsoring us so we can create more helpful resources.
If you appreciate this project, be sure to check out our other projects.
- The Ultimate Guide to Building APIs & SPAs: Build web & mobile apps from the same codebase.
- Building Multi-Platform Browser Extensions: Ship extensions to all browsers from the same codebase.
- Bugflow: Get visual bug reports directly in GitHub, GitLab, and more.
- SelfHost Pro: Connect Stripe or Lemonsqueezy to a private docker registry for self-hosted apps.
- AmplitudeJS: Open-source HTML5 & JavaScript Web Audio Library.
- Spin: Laravel Sail alternative for running Docker from development β production.
- Financial Freedom: Open source alternative to Mint, YNAB, & Monarch Money.















