轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥7起我的订单
文档
工具
提交工单页面收录
php-zts

zaioll/php-zts

zaioll

Image PHP-FPM-ZTS out-of-the-box with dynamic configuration through env vars at container init.

1 次收藏下载次数: 0状态:社区镜像维护者:zaioll仓库类型:镜像最近更新:3 年前
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

镜像简介
下载命令
镜像标签列表与下载命令
轩辕镜像,不浪费每一次拉取。
点击查看

!https://img.shields.io/badge/php-7.4-blue https://img.shields.io/badge/License-MIT-yellow.svg](https://opensource.org/licenses/MIT) !https://img.shields.io/***/follow/zaioll?label=follow&style=social

PHP-ZTS Docker image

PHP is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

Getting start

Daemon

When running docker image as a daemon, the /run/init/start shell script is executed at startup.

bash
user@host:$ docker run -d -it --name ${my_container_name} -v "${host_path}:/var/www/html" zaioll/php-zts:${php_version}

To share the socket file, create shared volume first:

bash
user@host:$ docker volume create sock

Then, run the container passing the created shared volume.

bash
user@host:$ docker run -d -it -v "sock:/run/php" -v "${host_path}:/var/www/html" --name ${my_container_name} zaioll/php-zts:${php_version}

The /run/init/hook-start shell script is called at the end of /run/init/start running process and before start supervisord. Add your custom shell script commands into it to run it.

Interactive

When running docker image as a iteractive form, the /run/init/start shell script is not executed. Then, PHP-FPM is not started. It needs manual run.

Configuration with environment variables

  • APP_ENV = ( ^dev* | ^prod* | debug ) Default: dev

    • Main diretive to configure the entire environment. When APP_ENV is configured with "dev" value, the xdebug will be enabled and configured and PHP (and webserver if it's enabled) default timeouts and time limits will be incresead at 8 times. On the other hand, if APP_ENV is configured with "prod" value, the opcache will be enabled and configured. PHP defaults values for timeouts will be decreased to 10% of the default values.

      • Default overwritten prod PHP config:

        bash
        PHP_INI="
            cgi.fix_pathinfo=0
            display_startup_errors=Off
            memory_limit=${memory_limit}M
            zend.assertions=-1
            report_memleaks=Off
            display_errors=Off
            log_errors=Off
            expose_php=Off
            max_execution_time=${max_execution_time}
            date.time_zone=America/Manaus
            session.cookie_secure=On"
        
      • Default overwritten dev PHP config:

        bash
        PHP_INI="
            cgi.fix_pathinfo=0
            display_startup_errors=On
            implicit_flush=On
            memory_limit=${memory_limit}M
            display_errors=On
            log_errors=On
            expose_php=On
            max_execution_time=${max_execution_time}
            date.time_zone=America/Manaus
            session.cookie_secure=Off"
        
  • PHP_FPM_SOCKET=( off | on ) Default: on

    • To enable PHP-FPM socket, set ENABLE_FPM_SOCKET env var to on to create and communicate through unix socket file /run/php/php7-fpm.sock or set to off for communication through tcp/9000 port instead.
  • WEB_SERVER=( on | off ) Default: on

  • OPCACHE_CONF=( off | $config ) Default: $config when prod environment

  • https://xdebug.org/docs/remote = ( off | $config ) Default: $config when dev environment

    • If Xdebug is enabled, the PHP-FPM expects xdebug configuration through XDEBUG_CONFIG env var.

    If ENABLE_FPM_SOCKET = "off", xdebug.remote_port will be configured to use 9003 port.

  • REDIS=( on | off ) Default: off

  • ENABLE_MEMCACHED=( on | off ) Default: off

  • ENABLE_PARALLEL=( on | off ) Default: on

  • ENABLE_MONGODB=( on | off ) Default: off

  • ENABLE_SWOOLE=( on | off ) Default: off

  • ENABLE_AMQP=( on | off ) Default: off

  • ENABLE_SODIUM=( on | off ) Default: on

  • ENABLE_DECIMAL=( on | off ) Default: on

PHP Documentation

The PHP manual is available at https://php.net/docs.

Docker image

Possible PHP versions

At every compilation, the last patch version is fetched.

EBNF%20%20&name=):

<php_version_installed>   ::= <php_version> <separator> <patch>
<php_version>             ::= <major> <separator> <minor>
<major>                   ::= "7"
<separator>               ::= "."
<minor>                   ::= "1" | "2" | "3" | "4"
<patch>                   ::=  ( "0" | [1-9] [0-9]*)

Features

  • https://getcomposer.org/ for dependency management in PHP.
  • Nginx and Apache2 webservers
  • https://github.com/phpbench/phpbench tool.
  • Phive

Modules

  • Parallel
  • Swoole
  • Decimal
  • https://github.com/xdebug/xdebug.git
  • https://github.com/php-memcached-dev/php-memcached.git
  • https://github.com/mongodb/mongo-php-driver.git
  • https://github.com/phpredis/phpredis.git
  • [Sodium]
  • https://github.com/php-amqp/php-amqp

Installed libs and extensions

Inside /info/ directory are compile and info logs files

Installed libs

LibraryVersion
libacl12.2.52-3+b1
libapt-pkg5.01.4.11
libaspell150.60.7~20110707-3+b2
libassuan02.4.3-2
libatm11:2.5.1-2
libattr11:2.4.47-2+b2
libaudit-common1:2.6.7-2
libaudit11:2.6.7-2
libblkid12.29.2-1+deb9u1
libbsd00.8.3-1+deb9u1
libbz2-1.01.0.6-8.1
libc-***2.24-11+deb9u4
libc-client2007e8:2007f~dfsg-5
libc-dev-***2.24-11+deb9u4
libc-l10n2.24-11+deb9u4
libc62.24-11+deb9u4
libc6-dev2.24-11+deb9u4
libcap-ng00.7.7-3+b1
libcomerr21.43.4-2+deb9u2
libcurl37.52.1-5+deb9u14
libcurl3-gnutls7.52.1-5+deb9u14
libdb5.35.3.28-12+deb9u1
libdebconfclient00.227
libedit23.1-20160903-3
libelf10.168-1
libenchant1c2a1.6.0-11+b1
libevent-2.0-52.0.21-stable-3
libexpat12.2.0-2+deb9u3
libfbclient23.0.1.32609.ds4-14
libfcgi-***2.4.0-8.4+b1
libfcgi0ldbl2.4.0-8.4+b1
libfdisk12.29.2-1+deb9u1
libffi63.2.1-6
libfontconfig12.11.0-6.7+b1
libfreetype62.6.3-3.2+deb9u2
libgcc11:6.3.0-18+deb9u1
libgcrypt201.7.6-2+deb9u4
libgd32.2.4-2+deb9u5
libgdbm31.8.3-14
libgeoip11.6.9-4
libglib2.0-02.50.3-2+deb9u2
libglib2.0-data2.50.3-2+deb9u2
libgmp102:6.1.2+dfsg-1
libgmpxx4ldbl2:6.1.2+dfsg-1
libgnutls303.5.8-5+deb9u5
libgpg-error01.26-2
libgpm21.20.4-6.2+b1
libgssapi-krb5-21.15-1+deb9u2
libgssrpc41.15-1+deb9u2
libhogweed43.3-1+b2
libhunspell-1.4-01.4.1-2+b2
libicu5757.1-6+deb9u4
libidn111.33-1+deb9u1
libidn2-00.16-1+deb9u1
li***otifytools03.14-2
libjbig02.1-3.1+b2
libjpeg62-turbo1:1.5.1-2+deb9u1
libk5***31.15-1+deb9u2
libkadm5clnt-mit111.15-1+deb9u2
libkadm5srv-mit111.15-1+deb9u2
libkdb5-81.15-1+deb9u2
libkeyutils11.5.9-9
libkrb5-31.15-1+deb9u2
libkrb5support01.15-1+deb9u2
libksba81.3.5-2
libldap-2.4-22.4.44+dfsg-5+deb9u8
libldap-common2.4.44+dfsg-5+deb9u8
libltdl72.4.6-2
liblz4-10.0~r131-2+deb9u1
liblzma55.2.2-1.2+b1
libmcrypt42.5.8-3.3
libmemcached111.0.18-4.1
libmemcachedutil21.0.18-4.1
libmnl01.0.4-2
libmongo-client00.1.8-3.1
libmount12.29.2-1+deb9u1
libmpdec22.4.2-1
libncurses56.0+20161126-1+deb9u2
libncursesw56.0+20161126-1+deb9u2
libnettle63.3-1+b2
libnghttp2-141.18.1-1+deb9u1
libnginx-mod-http-auth-pam1.10.3-1+deb9u7
libnginx-mod-http-dav-ext1.10.3-1+deb9u7
libnginx-mod-http-echo1.10.3-1+deb9u7
libnginx-mod-http-geoip1.10.3-1+deb9u7
libnginx-mod-http-image-filter1.10.3-1+deb9u7
libnginx-mod-http-subs-filter1.10.3-1+deb9u7
libnginx-mod-http-upstream-fai1.10.3-1+deb9u7
libnginx-mod-http-xslt-filter1.10.3-1+deb9u7
libnginx-mod-mail1.10.3-1+deb9u7
libnginx-mod-stream1.10.3-1+deb9u7
libnpth01.3-1
libonig46.1.3-2+deb9u2
libp11-kit00.23.3-2+deb9u1
libpam-modules1.1.8-3.6
libpam-modules-***1.1.8-3.6
libpam-runtime1.1.8-3.6
libpam0g1.1.8-3.6
libpci31:3.5.2-1
libpcre32:8.39-3
libperl5.245.24.1-3+deb9u7
libpng16-161.6.28-1+deb9u1
libpq59.6.22-0+deb9u1
libpsl50.17.0-3
libpython-stdlib2.7.13-2
libpython2.7-minimal2.7.13-2+deb9u5
libpython2.7-stdlib2.7.13-2+deb9u5
librabbitmq40.8.0-1+b3
libreadline77.0-3
librecode03.6-23
librtmp12.4+20151223.gitfa8646d.1-1+b1
libsasl2-22.1.27~101-g0780600+dfsg-3+deb
libsasl2-modules2.1.27~101-g0780600+dfsg-3+deb
libsasl2-modules-db2.1.27~101-g0780600+dfsg-3+deb
libselinux12.6-3+b3
libsemanage-common2.6-2
libsemanage12.6-2
libsensors41:3.4.0-4
libsepol12.6-2
libsmartcols12.29.2-1+deb9u1
libsnappy1v51.1.3-3
libsnmp-base5.7.3+dfsg-1.7+deb9u3
libsnmp305.7.3+dfsg-1.7+deb9u3
libsodium181.0.11-2
libsqlite3-03.16.2-5+deb9u3
libss21.43.4-2+deb9u2
libssh2-11.7.0-1+deb9u1
libssl1.0.21.0.2u-1~deb9u4
libssl1.11.1.0l-1~deb9u3
libstdc++66.3.0-18+deb9u1
libsystemd0232-25+deb9u12
libtasn1-64.10-1.1+deb9u1
libtext-iconv-perl1.7-5+b4
libtiff54.0.8-2+deb9u6
libtinfo56.0+20161126-1+deb9u2
libtommath11.0-4
libudev1232-25+deb9u12
libunistring00.9.6+really0.9.3-0.1
libustr-1.0-11.0.4-6
libuuid12.29.2-1+deb9u1
libwebp60.5.2-1+deb9u1
libwrap07.6.q-26
libx11-62:1.6.4-3+deb9u4
libx11-data2:1.6.4-3+deb9u4
libxau61:1.0.8-1
libxcb11.12-1
libxdmcp61:1.1.2-3
libxml22.9.4+dfsg1-2.2+deb9u5
libxpm41:3.5.12-1
libxslt1.11.1.29-2.1+deb9u2
libxtables121.6.0+snapshot20161117-6
libzip41.1.2-1.1+b1

Installed PHP extensions

ExtensionVersion
Core7.4.21
date7.4.21
libxml7.4.21
openssl7.4.21
pcre7.4.21
sqlite37.4.21
zlib7.4.21
bcmath7.4.21
bz27.4.21
calendar7.4.21
ctype7.4.21
curl7.4.21
dom20031129
enchant7.4.21
hash7.4.21
FFI7.4.21
fileinfo7.4.21
filter7.4.21
ftp7.4.21
gd7.4.21
gettext7.4.21
gmp7.4.21
SPL7.4.21
iconv7.4.21
session7.4.21
intl7.4.21
json7.4.21
mbstring7.4.21
standard7.4.21
pcntl7.4.21
PDO7.4.21
PDO_Firebird7.4.21
mysqlndmysqlnd
pdo_pgsql7.4.21
pdo_sqlite7.4.21
pgsql7.4.21
Phar7.4.21
posix7.4.21
pspell7.4.21
readline7.4.21
Reflection7.4.21
imap7.4.21
SimpleXML7.4.21
soap7.4.21
sockets7.4.21
pdo_mysql7.4.21
exif7.4.21
sysvsem7.4.21
sysvshm7.4.21
tokenizer7.4.21
xml7.4.21
xmlreader7.4.21
xmlrpc7.4.21
xmlwriter7.4.21
xsl7.4.21
zip1.15.6
mysqli7.4.21
amqp1.10.2
decimal1.4.0
memcached3.1.5
mongodb1.9.1
parallel1.1.4
redis5.3.4
sodium2.0.23
swoole4.6.7
ZendOPcache
xdebug3.0.4

Benchmarks

Environment

The benchmarks were generated by the https://httpd.apache.org/docs/2.4/programs/ab.html, making requests on index.php script over the PHP built-in web server and plotted with the gnuplot program with configurations inspired in this article.

php
// /index.php
<?php
for ($i = 0; $i < 50; $i++) {
    if ($i % 2 == 0) {
        echo ".";
        continue;
    }
    echo "*";
}
ini
[opcache]
zend_extension=${extension_dir}/opcache.so
opcache.enable=1
opcache.enable_cli=0
opcache.validate_timestamps=0
opcache.max_accelerated_files=65406
opcache.memory_consumption=256
opcache.interned_strings_buffer=12
opcache.fast_shutdown=1
opcache.enable_file_override=1
# Tell gnuplot to use tabs as the delimiter instead of spaces (default)
set datafile separator '\t'

# Output to a jpeg file
set terminal jpeg size 1280,720

# Set the aspect ratio of the graph
set size 1, 1

# The file to write to
set output "<connections>_<concurrency>.jpg"

# The graph title
set title "Benchmark testing with opcache enabled and xdebug disabled: ab -n <connections> -c <concurrency> -g out.data http://localhost/"

# Where to place the legend/key
set key left top

# Draw gridlines oriented on the y axis
set grid y

# Specify that the x-series data is time data
set xdata time

# Specify the *input* format of the time data
set timefmt "%s"

# Specify the *output* format for the x-axis tick labels
set format x "%S"

# Label the x-axis
set xlabel 'seconds'

# Label the y-axis
set ylabel "response time (ms)"

# Plot the data
plot "out.data" every ::2 using 2:5 title 'response time' with points 
exit

Licence

MIT


镜像拉取方式

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

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

docker pull docker.xuanyuan.run/zaioll/php-zts:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull zaioll/php-zts:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 Docker

Linux Docker 一键安装

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 专业版 · 企业版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
zaioll/php-zts
定价查看流量套餐与价格
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥7/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥7/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 php-zts 镜像推荐

zaioll/vscode-php logo

zaioll/vscode-php

zaioll
暂无描述
585 次下载
5 年前更新
zaioll/postgres logo

zaioll/postgres

zaioll
暂无描述
98 次下载
5 年前更新

查看更多 php-zts 相关镜像