Overview

Full name
docker.io/webdevops/php-nginx
Registry
docker.io
Namespace
webdevops
Repository
php-nginx
Cached tags
45
Last synced
07/05/2026, 06:07 AM

Introduction

WebDevOps PHP-Nginx 一体化 Web 运行时镜像,内置 PHP-FPM 与 Nginx,Laravel/WordPress 等 PHP 应用容器化部署常用基础栈。

Details

webdevops/php-nginx 将 Nginx 反向代理与 PHP-FPM 打包在同一容器,通过环境变量切换 PHP 版本与站点配置。定位为 PHP Web 应用运行时,挂载代码目录即可对外提供 HTTP 服务;中小型 CMS、电商后台或内部管理系统的 docker 快速交付。

快速启动

docker run -d --name php-nginx \
  -p 8080:80 \
  -v /data/www:/app \
  docker.io/webdevops/php-nginx:8.3

推荐实践

docker run -d --name php-nginx \
  --restart unless-stopped \
  -p 8080:80 \
  -v /data/www:/app \
  -e WEB_DOCUMENT_ROOT=/app/public \
  -e PHP_MEMORY_LIMIT=256M \
  docker.io/webdevops/php-nginx:8.3

核心参数说明

  • -p 8080:80 — HTTP 访问端口
  • -v .../www:... — PHP 源码与静态资源
  • WEB_DOCUMENT_ROOT — 站点根目录
  • PHP_MEMORY_LIMIT — FPM 内存上限

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: php-nginx
spec:
  replicas: 2
  selector:
    matchLabels:
      app: php-nginx
  template:
    metadata:
      labels:
        app: php-nginx
    spec:
      containers:
        - name: web
          image: docker.io/webdevops/php-nginx:8.3
          ports:
            - containerPort: 80
          env:
            - name: WEB_DOCUMENT_ROOT
              value: /app/public
          volumeMounts:
            - name: www
              mountPath: /app
      volumes:
        - name: www
          persistentVolumeClaim:
            claimName: php-www
---
apiVersion: v1
kind: Service
metadata:
  name: php-nginx
spec:
  selector:
    app: php-nginx
  ports:
    - port: 80
      targetPort: 80

Ingress 暴露 HTTPS;PVC 持久化上传文件。

Latest tags (20)

View all 45 tags →
TagArchPushed AtSizeDigestSyncWishAction
docker.io/webdevops/php-nginx
:8.3-alpine
linux/amd64linux/arm64
2026/07/04 12:17158.1 MBsha256:d322e780db33
docker.io/webdevops/php-nginx
:8.4-alpine
linux/amd64linux/arm64
2026/07/04 12:16161.3 MBsha256:9ec11e97dbc3
docker.io/webdevops/php-nginx
:8.3
linux/amd64linux/arm64
2026/07/04 12:16405.3 MBsha256:0d787ba720a6
docker.io/webdevops/php-nginx
:8.4
linux/amd64linux/arm64
2026/07/04 12:15408.4 MBsha256:f8ae30c6b523
docker.io/webdevops/php-nginx
:8.1-alpine
linux/amd64linux/arm64
2026/07/04 12:15158.1 MBsha256:3f944921b986
docker.io/webdevops/php-nginx
:8.5-alpine
linux/amd64linux/arm64
2026/07/04 12:15163.2 MBsha256:f1ca7b6bd32e
docker.io/webdevops/php-nginx
:8.2-alpine
linux/amd64linux/arm64
2026/07/04 12:14157.4 MBsha256:1d0cce548ed0
docker.io/webdevops/php-nginx
:8.1
linux/amd64linux/arm64
2026/07/04 12:10422.0 MBsha256:f5f7fc7f2f7e
docker.io/webdevops/php-nginx
:8.5
linux/amd64linux/arm64
2026/07/04 12:07409.9 MBsha256:dc884f2996c6
docker.io/webdevops/php-nginx
:8.2
linux/amd64linux/arm64
2026/07/04 12:07404.6 MBsha256:3315a49448be
docker.io/webdevops/php-nginx
:8.0
linux/amd64
2024/06/28 09:31363.3 MBsha256:3377d9a7cd7f
docker.io/webdevops/php-nginx
:8.0-alpine
linux/amd64
2024/06/28 09:28159.8 MBsha256:1e260675eed5
docker.io/webdevops/php-nginx
:7.4-alpine
linux/amd64
2024/01/04 19:35157.7 MBsha256:3b2d81bc87cd
docker.io/webdevops/php-nginx
:7.4
linux/amd64
2023/11/30 01:59353.1 MBsha256:e316baf2caa9
docker.io/webdevops/php-nginx
:7.3-alpine
linux/amd64
2022/11/04 09:32160.0 MBsha256:59c8d1247e20
docker.io/webdevops/php-nginx
:7.3
linux/amd64
2022/11/04 09:30376.6 MBsha256:77171112a7c5
docker.io/webdevops/php-nginx
:7.2
linux/amd64
2022/01/12 23:00369.7 MBsha256:82de28d0d9de
docker.io/webdevops/php-nginx
:7.1-alpine
linux/amd64
2021/11/19 21:11149.3 MBsha256:31dc25dbe2a4
docker.io/webdevops/php-nginx
:7.2-alpine
linux/amd64
2021/11/19 21:05156.4 MBsha256:32bcd5250ee7
docker.io/webdevops/php-nginx
:7.1
linux/amd64
2021/05/27 00:57380.1 MBsha256:f178bc293032