概要

フル名
docker.io/trafex/alpine-nginx-php7
Registry
docker.io
名前空間
trafex
リポジトリ
alpine-nginx-php7
キャッシュ Tag 数
36
最終同期
07/06/2026, 11:14 AM

概要

trafex alpine-nginx-php7 一体化 Web 栈镜像,Nginx + PHP-FPM 同容器,适合轻量 PHP 站点与 WordPress 私有化部署。

詳細

trafex/alpine-nginx-php7 在 Alpine 上集成 Nginx 与 PHP 7 FPM,通过 supervisor 同进程管理。典型用于小型 PHP CMS 或 API,与 php:apache 相比更轻且 Nginx 性能更好。定位为 Web 应用运行时,需 volume 挂载代码与上传目录;生产固定 tag、禁用危险 PHP 函数并 HTTPS 反代。

快速启动

docker run -d --name nginx-php7 \
  -p 8080:8080 \
  -v $(pwd)/www:/var/www/html \
  docker.io/trafex/alpine-nginx-php7:latest

推荐实践

docker run -d --name nginx-php7 \
  --restart unless-stopped \
  -p 8080:8080 \
  -v /data/php/www:/var/www/html \
  -v /data/php/uploads:/var/www/html/uploads \
  docker.io/trafex/alpine-nginx-php7:7.4.33

核心参数说明

  • -p 8080:8080 — Nginx HTTP 端口
  • -v .../www:... — PHP 站点代码目录
  • -v .../uploads:... — 用户上传持久化
  • --restart unless-stopped — Web 栈持续在线
  • 固定 tag — PHP 7 与 Nginx 版本 pin

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-php7
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx-php7
  template:
    metadata:
      labels:
        app: nginx-php7
    spec:
      containers:
        - name: web
          image: docker.io/trafex/alpine-nginx-php7:7.4.33
          ports:
            - containerPort: 8080
          volumeMounts:
            - name: www
              mountPath: /var/www/html
      volumes:
        - name: www
          persistentVolumeClaim:
            claimName: php-www
---
apiVersion: v1
kind: Service
metadata:
  name: nginx-php7
spec:
  selector:
    app: nginx-php7
  ports:
    - port: 8080
      targetPort: 8080

Ingress TLS;PHP 7 已 EOL,新项目建议迁移 PHP 8 栈。

Tagアーキテクチャプッシュ日時サイズDigest同期期望操作
docker.io/trafex/alpine-nginx-php7
:2.1.0
linux/amd64
2021/07/05 03:2843.0 MBsha256:1bb3e7546c07
docker.io/trafex/alpine-nginx-php7
:latest
linux/amd64
2021/07/05 03:1743.0 MBsha256:d18e3894cc8f
docker.io/trafex/alpine-nginx-php7
:2.0.2
linux/amd64
2021/05/17 19:2642.0 MBsha256:6d97e3a4f2ff
docker.io/trafex/alpine-nginx-php7
:2.0.1
linux/amd64
2021/04/22 21:0641.9 MBsha256:a06fe9857a4c
docker.io/trafex/alpine-nginx-php7
:2.0.0
linux/amd64
2021/04/14 04:5441.9 MBsha256:8ea8e8eb8026
docker.io/trafex/alpine-nginx-php7
:1.10.0
linux/amd64
2021/01/19 00:3241.6 MBsha256:161c70f6aa41
docker.io/trafex/alpine-nginx-php7
:1.9.0
linux/amd64
2020/12/15 17:3840.9 MBsha256:5785ef378d90
docker.io/trafex/alpine-nginx-php7
:1.8.0
linux/amd64
2020/06/19 13:1640.9 MBsha256:6e4a7576c836
docker.io/trafex/alpine-nginx-php7
:1.7.0
linux/amd64
2020/04/26 14:3142.7 MBsha256:40a7fd9329db
docker.io/trafex/alpine-nginx-php7
:1.6.0
linux/amd64
2020/04/21 04:1242.5 MBsha256:7c731450786b
docker.io/trafex/alpine-nginx-php7
:1.5.0
linux/amd64
2020/03/15 15:0442.5 MBsha256:8ec9c8946a91
docker.io/trafex/alpine-nginx-php7
:1.4.0
linux/amd64
2020/02/09 15:5337.8 MBsha256:48fc16eef2cf
docker.io/trafex/alpine-nginx-php7
:1.3.0
linux/amd64
2019/11/06 16:5737.8 MBsha256:c0d9ce6785dd
docker.io/trafex/alpine-nginx-php7
:1.2.0
linux/amd64
2019/08/03 20:4537.8 MBsha256:8f33c93d1481
docker.io/trafex/alpine-nginx-php7
:1.1.0
linux/amd64
2019/07/21 14:4637.8 MBsha256:d7fe31ae5fc7
docker.io/trafex/alpine-nginx-php7
:1.0.0
linux/amd64
2019/07/21 14:3937.1 MBsha256:c7e5ecc8e409
docker.io/trafex/alpine-nginx-php7
:ba1dd422
linux/amd64
2019/01/25 17:3436.6 MBsha256:324780da2d71
docker.io/trafex/alpine-nginx-php7
:b8890aad
linux/amd64
2019/01/04 17:3436.6 MBsha256:220219a95ca3
docker.io/trafex/alpine-nginx-php7
:cf28926c
linux/amd64
2018/09/28 17:2536.6 MBsha256:f4efc541fc88
docker.io/trafex/alpine-nginx-php7
:ef054a58
linux/amd64
2018/07/20 17:2035.5 MBsha256:d550e5a08a40