php

serversideup/php Docker Image

适合生产环境的PHP Docker镜像,针对Laravel和WordPress进行了优化。

70 次收藏下载次数: 0状态:社区镜像维护者:serversideup仓库类型:镜像最近更新:
下载命令
点击查看

https://github.com/serversideup/docker-php/actions/workflows/action_publish-images-production.yml

https://github.com/serversideup/docker-php/blob/main/LICENSE

https://hub.docker.com/r/serversideup/php/

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

Getting started

Try it in two minutes

The quick start guide walks you through your first PHP app with Docker:

  1. ✅ Run phpinfo() in your browser
  2. ✅ Change PHP settings with environment variables
  3. ✅ Upgrade or downgrade PHP by changing one line
  4. ✅ Switch variations (FPM, FrankenPHP, and more)

Follow the quick start guide →

Quick example

A Laravel app with NGINX and PHP 8.5, configured with environment variables:

yml
services:
  php:
    image: serversideup/php:8.5-fpm-nginx
    ports:
      - "80:8080"
    environment:
      PHP_MEMORY_LIMIT: "512M"
      # Run migrations, storage:link, and optimize on start
      AUTORUN_ENABLED: "true"
    volumes:
      - .:/var/www/html

Image variations

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

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

Popular variations

VariationBest ForExample
cliCLI scripts, cron jobs, queuesserversideup/php:8.5-cli
fpmCustom web server setupserversideup/php:8.5-fpm
fpm-apacheApache-based deploymentsserversideup/php:8.5-fpm-apache
fpm-nginxStable and performant web serverserversideup/php:8.5-fpm-nginx
frankenphpModern, high-performance apps with worker modeserversideup/php:8.5-frankenphp

Supported PHP versions and platforms

[!NOTE]
All images are available on https://hub.docker.com/r/serversideup/php/ and https://github.com/serversideup/docker-php/pkgs/container/php.

We support PHP 8.2 through 8.6 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
cliDebian Based





Alpine Based




fpmDebian Based





Alpine Based




fpm-apacheDebian Based




fpm-nginxDebian Based





Alpine Based




frankenphpDebian Based




Alpine Based



unit (removed)⚠️ NGINX no longer maintains NGINX Unit, so this variation is no longer built. Learn more →

Professional support

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.

Resources

  • Website overview of the product.
  • Docs for setup guides and the full reference.
  • ******* for friendly support from the community and the team.
  • https://github.com/serversideup/docker-php for source code, bug reports, and project management.
  • Get Professional Help - Get video + screen-sharing help directly from the core contributors.

Contributing

Bug fixes, features, and docs improvements are all welcome. Read the contribution guide and code of conduct before opening a pull request.

  • Bug Report: If you're experiencing an issue while using these images, please https://github.com/serversideup/docker-php/issues/new/choose.
  • Feature Request: Make this project better by https://github.com/serversideup/docker-php/discussions/66.
  • Documentation: Improve our documentation by submitting a documentation change.
  • Community Support: Help others on https://github.com/serversideup/docker-php/discussions or ***.
  • Security Report: Report critical security issues via our responsible disclosure policy.

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

Our ***

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

https://github.com/***/serversideup

Platinum ***

Silver ***

Bronze ***

Deimos Industries · CarePilot

Infrastructure ***

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.

  https://hub.docker.com/u/serversideup

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

https://github.com/danpastori

https://github.com/jaydrogers

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.
  • 💻 https://github.com/serversideup - Check out our other open source projects.
  • 📫 Newsletter - Skip the algorithms and get quality content right to your inbox.
  • 🐥 X (*)** - You can also follow Dan and Jay.
  • ❤️ https://github.com/***/serversideup - Please *** 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 *****: 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.
  • https://github.com/serversideup/docker-ansible: Run Ansible anywhere with a lightweight and powerful Docker image.

📚 Books

  • Building Browser Extensions: Build browser extensions for Firefox, Chrome, and more.
  • Ultimate Guide To Building APIs & SPAs: Build web and mobile apps from the same codebase.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 php 镜像标签

docker pull docker.xuanyuan.run/serversideup/php:<标签>

DockerHub 原生拉取命令

docker pull serversideup/php:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告