
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
基于Alpine的多阶段构建Docker化版本的https://github.com/FriendsOfPHP/PHP-CS-Fixer[1]。该镜像每晚针对多个稳定版本构建并推送到Dockerhub。
[1] 官方项目: https://github.com/FriendsOfPHP/PHP-CS-Fixer
amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x
以下Docker镜像标签为滚动发布版本,每晚构建和更新。
| Docker标签 | Git引用 | PHPCF版本 | PHP版本 | 支持的架构 |
|---|---|---|---|---|
latest | master | latest | latest | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-php8.1 | master | latest | 8.1 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-php8.0 | master | latest | 8.0 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-php7.4 | master | latest | 7.4 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
3 | master | 3.x.x | latest | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
3-php8.1 | master | 3.x.x | 8.1 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
3-php8.0 | master | 3.x.x | 8.0 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
3-php7.4 | master | 3.x.x | 7.4 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2 | master | 2.x.x | latest | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php8.1 | master | 2.x.x | 8.1 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php8.0 | master | 2.x.x | 8.0 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php7.4 | master | 2.x.x | 7.4 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php7.3 | master | 2.x.x | 7.3 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php7.2 | master | 2.x.x | 7.2 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php7.1 | master | 2.x.x | 7.1 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php7.0 | master | 2.x.x | 7.0 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le |
2-php5.6 | master | 2.x.x | 5.6 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le |
以下Docker镜像标签只构建一次,可用于可重现构建。其版本永不改变,因此您需要定期更新管道中的标签以保持最新。
| Docker标签 | Git引用 | PHPCF版本 | PHP版本 | 支持的架构 |
|---|---|---|---|---|
latest-<tag> | git: <tag> | latest | latest | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-php8.1-<tag> | git: <tag> | latest | 8.1 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-php8.0-<tag> | git: <tag> | latest | 8.0 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-php7.4-<tag> | git: <tag> | latest | 7.4 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
3-<tag> | git: <tag> | 3.x.x | latest | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
3-php8.1-<tag> | git: <tag> | 3.x.x | 8.1 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
3-php8.0-<tag> | git: <tag> | 3.x.x | 8.0 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
3-php7.4-<tag> | git: <tag> | 3.x.x | 7.4 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-<tag> | git: <tag> | 2.x.x | latest | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php8.1-<tag> | git: <tag> | 2.x.x | 8.1 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php8.0-<tag> | git: <tag> | 2.x.x | 8.0 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php7.4-<tag> | git: <tag> | 2.x.x | 7.4 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php7.3-<tag> | git: <tag> | 2.x.x | 7.3 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php7.2-<tag> | git: <tag> | 2.x.x | 7.2 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php7.1-<tag> | git: <tag> | 2.x.x | 7.1 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
2-php7.0-<tag> | git: <tag> | 2.x.x | 7.0 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le |
2-php5.6-<tag> | git: <tag> | 2.x.x | 5.6 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le |
其中
<tag>指的是此仓库中选择的git标签。
Docker容器内的工作目录是 /data/,应本地挂载此目录。
bash$ docker run --rm cytopia/php-cs-fixer --help Usage: list [options] [--] [<namespace>] Arguments: namespace The namespace name Options: --raw To output raw command list --format=FORMAT The output format (txt, xml, json, or md) [default: "txt"] Help: The list command lists all commands: php /usr/bin/php-cs-fixer list You can also display the commands for a specific namespace: php /usr/bin/php-cs-fixer list test You can also output the information in other formats by using the --format option: php /usr/bin/php-cs-fixer list --format=xml It's also possible to get raw list of commands (useful for embedding command runner): php /usr/bin/php-cs-fixer list --raw
bash$ docker run --rm -v $(pwd):/data cytopia/php-cs-fixer fix --dry-run --diff .
diffLoaded config default. Using cache file ".php_cs.cache". 1) fail.php ---------- begin diff ---------- --- Original +++ New @@ @@ <?php echo "test"; -if ( 1 ==2) { - echo "asd"; } +if (1 ==2) { + echo "asd"; +} ----------- end diff ----------- Checked all files in 0.004 seconds, 10.000 MB memory used
您可以将以下Makefile添加到项目中,以便轻松使用php-cs-fixer。
makeifneq (,) .error This Makefile requires GNU Make. endif .PHONY: lint _lint-pcf _update-pcf CURRENT_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) PCF_VERSION = 2 lint: @echo "################################################################################" @echo "# Linting Stage" @echo "################################################################################" @$(MAKE) --no-print-directory _lint-pcf _lint-pcf: _update-pcf @echo "------------------------------------------------------------" @echo " PHP Code Style Fixer" @echo "------------------------------------------------------------" @if docker run --rm \ -v $(CURRENT_DIR):/data \ cytopia/php-cs-fixer:$(PCF_VERSION) \ fix --dry-run --diff .; then \ echo "OK"; \ else \ echo "Failed"; \ exit 1; \ fi _update-pcf: docker pull cytopia/php-cs-fixer:$(PCF_VERSION)
yml--- sudo: required language: minimal services: - docker script: - make lint
MIT许可证
Copyright (c) 2019 https://github.com/cytopia
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。




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