
Acceleration Service 是为 Harbor 提供的通用服务,具备自动将用户镜像转换为加速镜像的能力。当用户执行镜像推送等操作时,Harbor 会通过集成的 https://github.com/dragonflyoss/image-service%E3%80%81https://github.com/containerd/stargz-snapshotter 等驱动,请求该服务完成相应的镜像转换。
https://github.com/goharbor/acceleration-service/actions/workflows/integration-test.yml/badge.svg?branch=main](https://github.com/goharbor/acceleration-service/actions/workflows/integration-test.yml) https://github.com/goharbor/acceleration-service/actions/workflows/concurrent-test.yml/badge.svg?branch=main](https://github.com/goharbor/acceleration-service/actions/workflows/concurrent-test.yml) https://github.com/goharbor/acceleration-service/actions/workflows/webhook-test.yml/badge.svg?branch=main](https://github.com/goharbor/acceleration-service/actions/workflows/webhook-test.yml)
更多详情参见 设计文档。
acceld 守护进程提供 HTTP 服务,处理来自 Harbor 或 accelctl 的镜像转换请求accelctl 命令行工具,支持管理 acceld 服务及执行一次性镜像转换适用于与 Harbor 容器镜像仓库集成,在用户推送镜像后自动触发加速转换,或通过手动请求/CLI 工具触发转换,满足容器镜像拉取加速需求,提升镜像分发效率。
获取 Harbor
若本地未部署 Harbor 服务,请参考 Harbor 官方文档 进行部署。
从发布页面获取二进制文件
当前 Acceleration Service 包含以下工具:
acceld:作为 HTTP 服务守护进程,处理来自 Harbor 或 accelctl 的镜像转换请求accelctl:CLI 工具,用于管理加速服务(acceld)及执行一次性镜像转换从 https://github.com/goharbor/acceleration-service/releases/latest 获取 accelctl 和 acceld 二进制文件。
配置 Harbor
登录 Harbor Web 界面。
选择一个项目,添加新的 Webhook 配置,填写以下字段:
<加速服务地址>/api/v1/conversions<加速服务配置的认证头>注意:Webhook 可帮助加速服务自动转换镜像。也可通过手动发送 HTTP 请求或使用
accelctl触发镜像转换任务。
创建系统机器人账户,填写以下字段:
<自定义>获取机器人账户 robot$<robot-name> 后,复制密钥并生成 base64 编码的认证字符串,命令如下:
bash$ echo -n '<robot-name>:<robot-secret>' | base64
注意:编码后的认证字符串将用于下一步配置加速服务。
配置加速服务
provider.source 改为 Harbor 服务主机名,auth 和 webhook.auth_header 需配置为上述步骤生成的认证信息converter.driver 字段中的设置请参考模板配置文件中的注释进行配置。
通过 acceld 服务转换
在配置文件目录启动 acceld 守护进程:
bash$ ./acceld --config ./config.yaml
触发镜像转换:
bash$ docker push <harbor服务地址>/library/nginx:latest
accelctl 手动触发(确保源 OCI v1 镜像已存在于 Harbor 仓库):bash$ ./accelctl task create <harbor服务地址>/library/nginx:latest
curl 发送 HTTP 请求触发(参考 开发文档):bash$ curl --location 'http://<加速服务地址>/api/v1/conversions?sync=$snyc' \ --header 'Content-Type: application/json' \ --data '{ "type": "PUSH_ARTIFACT", "event_data": { "resources": [ { "resource_url": "<harbor服务地址>/dfns/alpine:latest" } ] } } '
一次性模式转换
一次性模式无需启动 acceld 服务,直接通过 accelctl 完成转换:
bash$ ./accelctl convert --config ./config.yaml 192.168.1.1/library/nginx:latest INFO[2022-01-28T03:39:28.039029557Z] 拉取镜像 192.168.1.1/library/nginx:latest module=converter INFO[2022-01-28T03:39:28.075375146Z] 拉取完成 192.168.1.1/library/nginx:latest module=converter INFO[2022-01-28T03:39:28.075530522Z] 开始转换镜像 192.168.1.1/library/nginx:latest module=converter INFO[2022-01-28T03:39:29.561103924Z] 转换完成 192.168.1.1/library/nginx:latest-nydus module=converter INFO[2022-01-28T03:39:29.561197593Z] 推送镜像 192.168.1.1/library/nginx:latest-nydus module=converter INFO[2022-01-28T03:39:29.587585066Z] 推送完成 192.168.1.1/library/nginx:latest-nydus module=converter
转换后的镜像与源 OCI 镜像位于同一仓库,两者标签后缀不同,可通过 Harbor Web 界面或 docker pull 命令查看。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。






探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
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
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务