
如果你用 DeepSeek、元宝AI、Copilot 等 AI 代为编写轩辕镜像的 docker pull、修改 compose 镜像地址,或排查拉取失败等问题,请让 AI 先读规则再动手,只要在 AI 对话里直接发送下面这句话即可:
生成 docker pull、修改 compose 的 image,或排查拉取失败前,请先阅读并严格遵守 https://xuanyuan.cloud/agents.md 中的规则。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Prism is an image transformation proxy for AWS S3. The source image is determined from the URL path. The transformation is determined from the URL query parameters. The transformed image is uploaded to S3 and a HTTP 302 Redirect response is returned pointing to the new image. Subsequent requests for the same image with the same parameters return the same S3 redirect without reprocessing the image.
!Prism Flow Diagram
[***] -> This is the live server domain.
URL: https://prism-dev.tryprism.com/images/test-1.jpg?h=200
Image file: images/test-1.jpg
Parameters: h=200
Response Redirect Location: https://s3.amazonaws.com/tryprism-dev/prism-images/images/test-1.jpg--resize--h__200.jpg
Set width
http://prism-dev.tryprism.com/images/test-1.jpg?w=100
!
Set height
http://prism-dev.tryprism.com/images/test-1.jpg?h=100
!
Set output format
http://prism-dev.tryprism.com/images/test-1.jpg?h=100&out=png
out options are jpg, png, webp.
If no option is specified and the client accepts webp then webp will be used by default)
!
Pad image to fit the exact dimensions specified
http://prism-dev.tryprism.com/images/test-1.jpg?cmd=resize_then_fit&w=100&h=100
!
Pad image to fit the exact dimensions specified, with background color specified
http://prism-dev.tryprism.com/images/test-1.jpg?cmd=resize_then_fit&w=100&h=100&frame_bg_color=000
!
Resize and crop to dimensions
http://prism-dev.tryprism.com/images/test-1.jpg?cmd=resize_then_crop&w=100&h=100
!
Crop first and resize to dimensions
http://prism-dev.tryprism.com/images/test-1.jpg?cmd=resize&w=100&h=100&crop_x=0&crop_y=0&crop_width=200&crop_height=200
(crop_* parameters are relative to original image dimensions)
!
Prism has two different modes of operation; Single Customer Mode and Multi Customer Mode.
In Single Customer Mode Prism reads and writes to a single S3 bucket. Use this mode when serving images for a single project.
Required Environment Variables:
images.myproject.com]myproject-images]images/test-1.jpg]us-east-1]S3_BUCKET (and S3_WRITE_BUCKET if provided).Optional Environment Variables:
myproject-prism-images] (If not provided, default is S3_BUCKET.)In Multi Customer Mode Prism can handle requests for multiple customers together, where each customer has a separate S3 bucket and separate credentials. The customers are separated by subdomain. The configuration and credentials for each subdomain are loaded from a credentials.json stored in the SECRETS_BUCKET.
Required Environment Variables:
tryprism.com]super-secret-private-bucket]prism-test]images/test-1.jpg]us-east-1]Example credentials.json
This JSON file maps subdomains to customer credentials.
WARNING: This file must not be publicly accessible!
{ "foo": { "read_bucket_name": "foo-production", "read_bucket_region": "us-east-1", "read_bucket_key_id": "AKIABLABLA...", "read_bucket_secret_key": "XFiefjlfkjgls....", }, "bar": { "read_bucket_name": "bar-images", "read_bucket_region": "eu-west-1", "read_bucket_key_id": "AKIAKABC...", "read_bucket_secret_key": "SNf1jJf2ffD....", }, }
Note: write_bucket_* parameters may be included to separate read and write buckets.
The TEST_IMAGE setting is used to provide an image to be used for the test and health check endpoints. In multi customer mode the DEFAULT_CUSTOMER setting must also be set for the test endpoints to work.
The Prism app runs under uWSGI. By default, it runs with 2 processes and 2 threads per process. These settings can be overridden using the UWSGI_PROCESSES and UWSGI_THREADS environment variables. Similarly, other options can be passed to uWSGI using UWSGI_* environment variables.
The Docker container runs a uwsgi process with a HTTP socket (port 8000) and a uwsgi socket (port 3001). For local development and testing connecting to the HTTP server is sufficient. For production use it is recommended to use Nginx in front of uwsgi. A sample Nginx configuration including caching setup is included here: nginx-sample.conf
To run docker container use following command:
docker-compose -f docker-compose.yml -f docker-compose.development.yml up
The 8000 port of the container is mapped to the 8001 port of the host. Use localhost:8001 to access the app.
http://localhost:8001/test. This test url runs the same command both on your local and the live Prism server, and provides comparisons between local and live prism server image resizing operations.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
发给 Cursor、ChatGPT、豆包等 AI 的说明文档
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
不支持 push
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务