📦serversideup / docker-php
← 返回首页
🐳 Production-ready Docker images for PHP. Optimized for Laravel, WordPress, and more!
⚖️ GPL-3.0#php#docker#docker-image#laravel#nginx🌐 serversideup.net📅 创建于 2021-03-08🔄 更新于 2026-10-30
🔗 GitHub Shell

📄 仓库 README

在 GitHub 查看 ↗
来自 GitHub 仓库自述文件 · 版权归原作者所有

Docker Images Logo

Build Status License Support us
Docker Hub Pulls Discord

Introduction

Production-ready PHP Docker images built on official PHP. Optimized for Laravel, WordPress, and modern PHP applications.

What Makes These Images Different?

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
|Production-Ready|Native Health Checks|High Performance| |:---:|:---:|:---:| |Customizable and Flexible|Native CloudFlare Support|Base on Official PHP| |FrankenPHP|Unified Logging|FPM + S6 Overlay|

Getting Started

Try it in 2 minutes ⚡

Want to see how easy it is? Our installation guide walks you through creating your first PHP app with Docker:

  1. ✅ Run phpinfo() in your browser
  2. ✅ Upgrade PHP versions by changing one line
  3. ✅ Switch between variations (FPM, FrankenPHP, etc.)
  4. ✅ See environment variables in action

👉 Follow the quick start guide

Quick Example

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/html

That's it. No complex configs. Just environment variables.

Ready to try it? Get started with our tutorial →

Available Image Variations

Choose the variation that fits your needs. All images follow the pattern:

serversideup/php:{{version}}-{{variation-name}}

Popular Variations

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

Supported PHP Versions & Platforms

[!NOTE]
All images are available on Docker Hub and GitHub Packages.

We support PHP 8.2 through 8.5 with both Debian and Alpine base images. PHP 8.1 is end of life but still built while its base operating systems receive security updates. See our security policy for the rule.

Learn More About Choosing an Image →

⚙️ Variation 🚀 Version
cli Debian Based
serversideup/php:8.5-cli
serversideup/php:8.4-cli
serversideup/php:8.3-cli
serversideup/php:8.2-cli
Alpine Based
serversideup/php:8.5-cli-alpine
serversideup/php:8.4-cli-alpine
serversideup/php:8.3-cli-alpine
serversideup/php:8.2-cli-alpine
fpm Debian Based
serversideup/php:8.5-fpm
serversideup/php:8.4-fpm
serversideup/php:8.3-fpm
serversideup/php:8.2-fpm
Alpine Based
serversideup/php:8.5-fpm-alpine
serversideup/php:8.4-fpm-alpine
serversideup/php:8.3-fpm-alpine
serversideup/php:8.2-fpm-alpine
fpm-apache Debian Based
serversideup/php:8.5-fpm-apache
serversideup/php:8.4-fpm-apache
serversideup/php:8.3-fpm-apache
serversideup/php:8.2-fpm-apache
fpm-nginx Debian Based
serversideup/php:8.5-fpm-nginx
serversideup/php:8.4-fpm-nginx
serversideup/php:8.3-fpm-nginx
serversideup/php:8.2-fpm-nginx
Alpine Based
serversideup/php:8.5-fpm-nginx-alpine
serversideup/php:8.4-fpm-nginx-alpine
serversideup/php:8.3-fpm-nginx-alpine
serversideup/php:8.2-fpm-nginx-alpine
frankenphp Debian Based
serversideup/php:8.5-frankenphp
serversideup/php:8.4-frankenphp
serversideup/php:8.3-frankenphp
Alpine Based
serversideup/php:8.5-frankenphp-alpine
serversideup/php:8.4-frankenphp-alpine
serversideup/php:8.3-frankenphp-alpine
unit (deprecated) ⚠️ NGINX is no longer maintaining NGINX Unit. We stopped providing updates for this image. Learn more →

Professional Support

Need help integrating Docker with your PHP application?

Resources

  • 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.

Contributing

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.

Need help getting started? Join our Discord community and we'll help you out!

Our Sponsors

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.

Become a sponsor

Platinum Sponsors

Sevalla

Silver Sponsors

GiGa infosystems

Bronze Sponsors

Deimos Industries · CarePilot (Formerly DocuCare)

Infrastructure Sponsors

These companies give us free access to the tools and infrastructure we use to build, test, and ship our open source projects. Their support helps our entire community.

Depot  Docker

About Us

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.

|
Dan Pastori
|
Jay Rogers
| | --- | --- | |

|

|

Hire Us

Get two senior Laravel experts who deliver quality code with predictable monthly pricing. Dan and Jay have 30+ years of combined experience building scalable Laravel applications.

  • 🎯 Complete Laravel expertise - Full-stack development, CI/CD, database optimization, mobile apps
  • 💰 Predictable pricing - Fixed monthly subscription, no hourly billing surprises, 40%+ savings
  • ⚡ Maximum productivity - 90%+ development time, no meetings, results in days not weeks
  • 🛡️ Risk-free - 7-day money-back guarantee, cancel anytime

💬 Discuss Your Project →

Find us at:

  • 📖 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.
  • 🐥 X (Twitter) - You can also follow Dan and Jay.
  • ❤️ Sponsor Us - Please consider sponsoring us so we can create more helpful resources.

Our Products

If you appreciate this project, be sure to check out our other projects.

🛠️ Premium

  • Self-Host Pro: Sell self-hosted software in minutes.
  • Spin Pro: Production-ready Docker templates for shipping quickly.

🌍 Open Source

  • Spin: Docker Simplified. Deploy Anywhere. Zero Downtime. Any OS.
  • Financial Freedom: Open source alternative to Mint, YNAB, and more.
  • AmplitudeJS: Customize the design of any element of the HTML5 Audio Player.
  • webext-bridge: Messaging in Web Extensions made easy. Batteries included.
  • serversideup/ansible: Run Ansible anywhere with a lightweight and powerful Docker image.

📚 Books

📈 近 7 天 Star 趋势

每日新增 Star(柱)与累计 Star(线)· 数据来自 GitHub

🏆 排名变化趋势

在各榜单中的排名历史(数字越小越靠前)

📋 历史上榜记录

每次快照的详细数据
日期 榜单 排名 周期新增 总 STAR