
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
This project provides a working configuration of NGINX configured to act as an authenticating and caching gateway for to AWS S3 or another S3 compatible service. This allows you to proxy a private S3 bucket without requiring users to authenticate to it. Within the proxy layer, additional functionality can be configured such as:
All such functionality can be enabled within a standard NGINX configuration because this project is nothing other than NGINX with additional configuration that allows for proxying S3. It can be used as-is if the predefined configuration is sufficient, or it can serve as a base example for a more customized configuration.
If the predefined configuration does not meet your needs, it is best to borrow from the patterns in this project and build your own configuration. For example, if you want to enable SSL/TLS and compression in your NGINX S3 gateway configuration, you will need to look at other documentation because this project does not enable those features of NGINX.
This project can be run as a stand-alone container or as a Systemd service. Both modes use the same NGINX configuration and are functionally equal in terms features. However, in the case of running as a Systemd service, other services can be configured that additional functionality such as https://certbot.eff.org/ for https://letsencrypt.org/ support.
Refer to the https://github.com/nginxinc/nginx-s3-gateway/blob/master/docs/getting_started.md for how to build and run the gateway.
The following environment variables are used to configure the gateway when running as a Container or as a Systemd service.
ALLOW_DIRECTORY_LIST - Enable directory listing - either true or falseAWS_SIGS_VERSION - AWS Signatures API version - either 2 or 4DNS_RESOLVERS - (optional) DNS resolvers (separated by single spaces) to configure NGINX withS3_ACCESS_KEY_ID - Access keyS3_BUCKET_NAME - Name of S3 bucket to proxy requests toS3_DEBUG - Flag (true/false) enabling AWS signatures debug output (default: false)S3_REGION - Region associated with APIS3_SECRET_KEY - Secret access keyS3_SERVER_PORT - SSL/TLS port to connect toS3_SERVER_PROTO - Protocol to used connect to S3 server - http or httpsS3_SERVER - S3 host to connect toS3_STYLE - The S3 host/path method - virtual, path or default. virtual is
the method that that uses DNS-style bucket+hostname:port.
This is the default value. path is a method that appends the bucket name
as the first directory in the URI's path. This method is used by many S3
compatible services. See this
https://aws.amazon.com/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/
for further information.PROXY_CACHE_VALID_OK - Sets caching time for response code 200 and 302PROXY_CACHE_VALID_NOTFOUND - Sets caching time for response code 404PROXY_CACHE_VALID_FORBIDDEN - Sets caching time for response code 403If you are using https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html,
you will need to omit the S3_ACCESS_KEY_ID and S3_SECRET_KEY variables from
the configuration.
When running with Docker, the above environment variables can be set in a file
with the --env-file flag. When running as a Systemd service, the environment
variables are specified in the /etc/nginx/environment file. An example of
the format of the file can be found in the https://github.com/nginxinc/nginx-s3-gateway/blob/master/settings.example
file.
Refer to the https://github.com/nginxinc/nginx-s3-gateway/blob/master/docs/development.md for more information about extending or testing the gateway.
All code include is licensed under the https://github.com/nginxinc/nginx-s3-gateway/blob/master/LICENSE.txt.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 nginxinc/nginx-s3-gateway 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: