
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
该镜像基于官方nginx镜像构建,提供稳定且最新的nginx环境,额外集成了QUIC+HTTP/3实验性支持、Google brotli压缩模块以及符合Mozilla SSL配置生成器标准的A级SSL配置。适用于需要高性能、高安全性的Web服务场景。
从Docker Hub拉取:
bashdocker pull macbre/nginx-brotli:1.19.6-http3
从GitHub Container Registry拉取:
bashdocker pull ghcr.io/macbre/nginx-brotli:latest
注:更多nginx版本可参考https://hub.docker.com/_/nginx/%EF%BC%8C%E4%BD%86%E9%9D%9E%E6%89%80%E6%9C%89%E7%89%88%E6%9C%AC%E9%83%BD%E5%8C%85%E5%90%ABHTTP/3%E6%94%AF%E6%8C%81%E3%80%82
该镜像基于官方nginx镜像构建,因此可参考https://hub.docker.com/_/nginx/%E8%BF%9B%E8%A1%8C%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE%E3%80%82%E9%A2%9D%E5%A4%96%E6%94%AF%E6%8C%81brotli%E6%A8%A1%E5%9D%97%E7%9A%84%E9%85%8D%E7%BD%AE%E6%8C%87%E4%BB%A4%EF%BC%8C%E8%AF%A6%E8%A7%81https://github.com/google/ngx_brotli#configuration-directives%E3%80%82
/etc/nginx/main.d目录下的.conf文件将被包含在nginx主配置上下文(可使用env等核心模块指令)/etc/nginx/conf.d目录下的.conf文件将被包含在http配置上下文镜像已预配置A级SSL支持,包含Mozilla推荐的2048位DH参数,路径为/etc/ssl/dhparam.pem。在SSL配置中引用:
nginxssl_dhparam /etc/ssl/dhparam.pem;
推荐使用Mozilla SSL配置生成器获取最佳SSL配置。
以下是启用QUIC和HTTP/3的服务器配置示例:
nginxserver { # 启用QUIC和HTTP/3 listen 443 http3 reuseport; # 同时支持HTTP/2和HTTP/1.1 listen 443 ssl http2; server_name localhost; # 替换为您的域名 # 需挂载SSL证书文件 ssl_certificate /etc/nginx/ssl/localhost.crt; ssl_certificate_key /etc/nginx/ssl/localhost.key; # 启用所有TLS版本(TLSv1.3是QUIC必需的) ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 启用0-RTT QUIC连接恢复 ssl_early_data on; # 添加Alt-Svc头以协商HTTP/3 add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400'; # 标识QUIC连接状态 add_header QUIC-Status $quic; location / { # 自定义站点配置 } }
注:运行容器时需正确挂载SSL证书和配置文件,可参考项目中的
run-docker.sh脚本了解详细部署流程。
通过nginx -V查看的编译配置:
nginx version: nginx/1.21.0 built by gcc 10.2.1 20201203 (Alpine 10.2.1_pre1) built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL) TLS SNI support enabled configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module --with-http_v3_module --add-module=/usr/src/ngx_brotli --with-cc-opt=-I../boringssl/include --with-ld-opt='-L../boringssl/build/ssl -L../boringssl/build/***'
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。





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