
如果你使用 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 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.
When running docker image as a daemon, the /run/init/start shell script is executed at startup.
bashuser@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:
bashuser@host:$ docker volume create sock
Then, run the container passing the created shared volume.
bashuser@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-startshell script is called at the end of/run/init/startrunning process and before startsupervisord. Add your custom shell script commands into it to run it.
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.
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:
bashPHP_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:
bashPHP_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
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
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
The PHP manual is available at https://php.net/docs.
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]*)
Inside /info/ directory are compile and info logs files
| Library | Version |
|---|---|
| libacl1 | 2.2.52-3+b1 |
| libapt-pkg5.0 | 1.4.11 |
| libaspell15 | 0.60.7~20110707-3+b2 |
| libassuan0 | 2.4.3-2 |
| libatm1 | 1:2.5.1-2 |
| libattr1 | 1:2.4.47-2+b2 |
| libaudit-common | 1:2.6.7-2 |
| libaudit1 | 1:2.6.7-2 |
| libblkid1 | 2.29.2-1+deb9u1 |
| libbsd0 | 0.8.3-1+deb9u1 |
| libbz2-1.0 | 1.0.6-8.1 |
| libc-*** | 2.24-11+deb9u4 |
| libc-client2007e | 8:2007f~dfsg-5 |
| libc-dev-*** | 2.24-11+deb9u4 |
| libc-l10n | 2.24-11+deb9u4 |
| libc6 | 2.24-11+deb9u4 |
| libc6-dev | 2.24-11+deb9u4 |
| libcap-ng0 | 0.7.7-3+b1 |
| libcomerr2 | 1.43.4-2+deb9u2 |
| libcurl3 | 7.52.1-5+deb9u14 |
| libcurl3-gnutls | 7.52.1-5+deb9u14 |
| libdb5.3 | 5.3.28-12+deb9u1 |
| libdebconfclient0 | 0.227 |
| libedit2 | 3.1-20160903-3 |
| libelf1 | 0.168-1 |
| libenchant1c2a | 1.6.0-11+b1 |
| libevent-2.0-5 | 2.0.21-stable-3 |
| libexpat1 | 2.2.0-2+deb9u3 |
| libfbclient2 | 3.0.1.32609.ds4-14 |
| libfcgi-*** | 2.4.0-8.4+b1 |
| libfcgi0ldbl | 2.4.0-8.4+b1 |
| libfdisk1 | 2.29.2-1+deb9u1 |
| libffi6 | 3.2.1-6 |
| libfontconfig1 | 2.11.0-6.7+b1 |
| libfreetype6 | 2.6.3-3.2+deb9u2 |
| libgcc1 | 1:6.3.0-18+deb9u1 |
| libgcrypt20 | 1.7.6-2+deb9u4 |
| libgd3 | 2.2.4-2+deb9u5 |
| libgdbm3 | 1.8.3-14 |
| libgeoip1 | 1.6.9-4 |
| libglib2.0-0 | 2.50.3-2+deb9u2 |
| libglib2.0-data | 2.50.3-2+deb9u2 |
| libgmp10 | 2:6.1.2+dfsg-1 |
| libgmpxx4ldbl | 2:6.1.2+dfsg-1 |
| libgnutls30 | 3.5.8-5+deb9u5 |
| libgpg-error0 | 1.26-2 |
| libgpm2 | 1.20.4-6.2+b1 |
| libgssapi-krb5-2 | 1.15-1+deb9u2 |
| libgssrpc4 | 1.15-1+deb9u2 |
| libhogweed4 | 3.3-1+b2 |
| libhunspell-1.4-0 | 1.4.1-2+b2 |
| libicu57 | 57.1-6+deb9u4 |
| libidn11 | 1.33-1+deb9u1 |
| libidn2-0 | 0.16-1+deb9u1 |
| li***otifytools0 | 3.14-2 |
| libjbig0 | 2.1-3.1+b2 |
| libjpeg62-turbo | 1:1.5.1-2+deb9u1 |
| libk5***3 | 1.15-1+deb9u2 |
| libkadm5clnt-mit11 | 1.15-1+deb9u2 |
| libkadm5srv-mit11 | 1.15-1+deb9u2 |
| libkdb5-8 | 1.15-1+deb9u2 |
| libkeyutils1 | 1.5.9-9 |
| libkrb5-3 | 1.15-1+deb9u2 |
| libkrb5support0 | 1.15-1+deb9u2 |
| libksba8 | 1.3.5-2 |
| libldap-2.4-2 | 2.4.44+dfsg-5+deb9u8 |
| libldap-common | 2.4.44+dfsg-5+deb9u8 |
| libltdl7 | 2.4.6-2 |
| liblz4-1 | 0.0~r131-2+deb9u1 |
| liblzma5 | 5.2.2-1.2+b1 |
| libmcrypt4 | 2.5.8-3.3 |
| libmemcached11 | 1.0.18-4.1 |
| libmemcachedutil2 | 1.0.18-4.1 |
| libmnl0 | 1.0.4-2 |
| libmongo-client0 | 0.1.8-3.1 |
| libmount1 | 2.29.2-1+deb9u1 |
| libmpdec2 | 2.4.2-1 |
| libncurses5 | 6.0+20161126-1+deb9u2 |
| libncursesw5 | 6.0+20161126-1+deb9u2 |
| libnettle6 | 3.3-1+b2 |
| libnghttp2-14 | 1.18.1-1+deb9u1 |
| libnginx-mod-http-auth-pam | 1.10.3-1+deb9u7 |
| libnginx-mod-http-dav-ext | 1.10.3-1+deb9u7 |
| libnginx-mod-http-echo | 1.10.3-1+deb9u7 |
| libnginx-mod-http-geoip | 1.10.3-1+deb9u7 |
| libnginx-mod-http-image-filter | 1.10.3-1+deb9u7 |
| libnginx-mod-http-subs-filter | 1.10.3-1+deb9u7 |
| libnginx-mod-http-upstream-fai | 1.10.3-1+deb9u7 |
| libnginx-mod-http-xslt-filter | 1.10.3-1+deb9u7 |
| libnginx-mod-mail | 1.10.3-1+deb9u7 |
| libnginx-mod-stream | 1.10.3-1+deb9u7 |
| libnpth0 | 1.3-1 |
| libonig4 | 6.1.3-2+deb9u2 |
| libp11-kit0 | 0.23.3-2+deb9u1 |
| libpam-modules | 1.1.8-3.6 |
| libpam-modules-*** | 1.1.8-3.6 |
| libpam-runtime | 1.1.8-3.6 |
| libpam0g | 1.1.8-3.6 |
| libpci3 | 1:3.5.2-1 |
| libpcre3 | 2:8.39-3 |
| libperl5.24 | 5.24.1-3+deb9u7 |
| libpng16-16 | 1.6.28-1+deb9u1 |
| libpq5 | 9.6.22-0+deb9u1 |
| libpsl5 | 0.17.0-3 |
| libpython-stdlib | 2.7.13-2 |
| libpython2.7-minimal | 2.7.13-2+deb9u5 |
| libpython2.7-stdlib | 2.7.13-2+deb9u5 |
| librabbitmq4 | 0.8.0-1+b3 |
| libreadline7 | 7.0-3 |
| librecode0 | 3.6-23 |
| librtmp1 | 2.4+20151223.gitfa8646d.1-1+b1 |
| libsasl2-2 | 2.1.27~101-g0780600+dfsg-3+deb |
| libsasl2-modules | 2.1.27~101-g0780600+dfsg-3+deb |
| libsasl2-modules-db | 2.1.27~101-g0780600+dfsg-3+deb |
| libselinux1 | 2.6-3+b3 |
| libsemanage-common | 2.6-2 |
| libsemanage1 | 2.6-2 |
| libsensors4 | 1:3.4.0-4 |
| libsepol1 | 2.6-2 |
| libsmartcols1 | 2.29.2-1+deb9u1 |
| libsnappy1v5 | 1.1.3-3 |
| libsnmp-base | 5.7.3+dfsg-1.7+deb9u3 |
| libsnmp30 | 5.7.3+dfsg-1.7+deb9u3 |
| libsodium18 | 1.0.11-2 |
| libsqlite3-0 | 3.16.2-5+deb9u3 |
| libss2 | 1.43.4-2+deb9u2 |
| libssh2-1 | 1.7.0-1+deb9u1 |
| libssl1.0.2 | 1.0.2u-1~deb9u4 |
| libssl1.1 | 1.1.0l-1~deb9u3 |
| libstdc++6 | 6.3.0-18+deb9u1 |
| libsystemd0 | 232-25+deb9u12 |
| libtasn1-6 | 4.10-1.1+deb9u1 |
| libtext-iconv-perl | 1.7-5+b4 |
| libtiff5 | 4.0.8-2+deb9u6 |
| libtinfo5 | 6.0+20161126-1+deb9u2 |
| libtommath1 | 1.0-4 |
| libudev1 | 232-25+deb9u12 |
| libunistring0 | 0.9.6+really0.9.3-0.1 |
| libustr-1.0-1 | 1.0.4-6 |
| libuuid1 | 2.29.2-1+deb9u1 |
| libwebp6 | 0.5.2-1+deb9u1 |
| libwrap0 | 7.6.q-26 |
| libx11-6 | 2:1.6.4-3+deb9u4 |
| libx11-data | 2:1.6.4-3+deb9u4 |
| libxau6 | 1:1.0.8-1 |
| libxcb1 | 1.12-1 |
| libxdmcp6 | 1:1.1.2-3 |
| libxml2 | 2.9.4+dfsg1-2.2+deb9u5 |
| libxpm4 | 1:3.5.12-1 |
| libxslt1.1 | 1.1.29-2.1+deb9u2 |
| libxtables12 | 1.6.0+snapshot20161117-6 |
| libzip4 | 1.1.2-1.1+b1 |
| Extension | Version |
|---|---|
| Core | 7.4.21 |
| date | 7.4.21 |
| libxml | 7.4.21 |
| openssl | 7.4.21 |
| pcre | 7.4.21 |
| sqlite3 | 7.4.21 |
| zlib | 7.4.21 |
| bcmath | 7.4.21 |
| bz2 | 7.4.21 |
| calendar | 7.4.21 |
| ctype | 7.4.21 |
| curl | 7.4.21 |
| dom | 20031129 |
| enchant | 7.4.21 |
| hash | 7.4.21 |
| FFI | 7.4.21 |
| fileinfo | 7.4.21 |
| filter | 7.4.21 |
| ftp | 7.4.21 |
| gd | 7.4.21 |
| gettext | 7.4.21 |
| gmp | 7.4.21 |
| SPL | 7.4.21 |
| iconv | 7.4.21 |
| session | 7.4.21 |
| intl | 7.4.21 |
| json | 7.4.21 |
| mbstring | 7.4.21 |
| standard | 7.4.21 |
| pcntl | 7.4.21 |
| PDO | 7.4.21 |
| PDO_Firebird | 7.4.21 |
| mysqlnd | mysqlnd |
| pdo_pgsql | 7.4.21 |
| pdo_sqlite | 7.4.21 |
| pgsql | 7.4.21 |
| Phar | 7.4.21 |
| posix | 7.4.21 |
| pspell | 7.4.21 |
| readline | 7.4.21 |
| Reflection | 7.4.21 |
| imap | 7.4.21 |
| SimpleXML | 7.4.21 |
| soap | 7.4.21 |
| sockets | 7.4.21 |
| pdo_mysql | 7.4.21 |
| exif | 7.4.21 |
| sysvsem | 7.4.21 |
| sysvshm | 7.4.21 |
| tokenizer | 7.4.21 |
| xml | 7.4.21 |
| xmlreader | 7.4.21 |
| xmlrpc | 7.4.21 |
| xmlwriter | 7.4.21 |
| xsl | 7.4.21 |
| zip | 1.15.6 |
| mysqli | 7.4.21 |
| amqp | 1.10.2 |
| decimal | 1.4.0 |
| memcached | 3.1.5 |
| mongodb | 1.9.1 |
| parallel | 1.1.4 |
| redis | 5.3.4 |
| sodium | 2.0.23 |
| swoole | 4.6.7 |
| Zend | OPcache |
| xdebug | 3.0.4 |
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
MIT
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务