本站支持搜索的镜像仓库:Docker Hub、gcr.io、ghcr.io、quay.io、k8s.gcr.io、registry.gcr.io、elastic.co、mcr.microsoft.com

Internal Content API用于提供已发布内容,包含内部组件和富内容字段的聚合结果,通过整合富内容源与内部组件源的信息,为客户端提供完整的内部内容访问服务。
unrollContent参数,支持动态内容、图片等资源的展开功能适用于需要访问包含内部组件的已发布内容的服务场景,如内容管理系统、内部内容预览平台、内容分析工具等,尤其适合需要整合富内容与内部组件数据的业务系统。
# 假设镜像名称为internal-content-api,具体请替换为实际镜像仓库地址 docker pull internal-content-api:latest
docker run -d \ -p 8084:8084 \ --name internal-content-api \ internal-content-api:latest \ --app-port "8084" \ --handler-path "internalcontent" \ --content-source-uri "[***]" \ --internal-components-source-uri "[***]" \ --content-source-app-name "Content Source Service" \ --internal-components-source-app-name "Internal Components Source Service" \ --content-source-app-health-uri "[***]" \ --internal-components-source-app-health-uri "[***]" \ --content-unroller-app-name "Content Unroller" \ --content-unroller-uri "[***]" \ --content-unroller-app-health-uri "[***]"
| 参数名 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|
| --app-port | 服务监听端口 | 是 | - |
| --handler-path | API处理路径前缀,用于构建内容访问端点 | 否 | "internalcontent" |
| --content-source-uri | 富内容源服务的内容访问URI | 是 | - |
| --internal-components-source-uri | 内部组件源服务的内容访问URI | 是 | - |
| --content-source-app-name | 富内容源服务名称(用于日志和监控) | 否 | - |
| --internal-components-source-app-name | 内部组件源服务名称(用于日志和监控) | 否 | - |
| --content-source-app-health-uri | 富内容源服务的健康检查URI | 否 | - |
| --internal-components-source-app-health-uri | 内部组件源服务的健康检查URI | 否 | - |
| --content-unroller-app-name | 内容展开器服务名称(用于日志和监控) | 否 | - |
| --content-unroller-uri | 内容展开器服务的访问URI | 否 | - |
| --content-unroller-app-health-uri | 内容展开器服务的健康检查URI | 否 | - |
# 获取源码 go get -u github.com/Financial-Times/internal-content-api cd $GOPATH/src/github.com/Financial-Times/internal-content-api # 安装依赖 dep ensure # 运行测试并构建 go test -race ./... go build .
# 安装二进制 go install # 启动服务(参数为示例,需根据实际环境调整) $GOPATH/bin/internal-content-api \ --app-port "8084" \ --handler-path "internalcontent" \ --content-source-uri "http://localhost:8080/__enriched-content-read-api/enrichedcontent" \ --internal-components-source-uri "http://localhost:8080/__content-public-read/internalcontent" \ --content-source-app-health-uri "http://localhost:8080/__enriched-content-read-api/__health" \ --internal-components-source-app-health-uri "http://localhost:8080/__content-public-read/__health" \ --content-unroller-uri "http://localhost:8080/__content-unroller-api/internalcontent" \ --content-unroller-app-health-uri "http://localhost:8080/__content-unroller-api/__health"
获取指定UUID的内部内容(富内容与内部组件的聚合结果)。
curl -v http://localhost:8084/internalcontent/9358ba1e-c07f-11e5-846f-79b0e3d20eaf
unrollContent={boolean}:是否展开动态内容、主图、正文图片、导语图片和备选图片,默认falsetrue时,将通过内容展开器服务获取并展开相关资源内容;设为false时,仅返回资源ID。200:成功返回内容404:指定UUID的内容不存在503:依赖的服务(如富内容源、内部组件源)不可用| 端点 | 描述 |
|---|---|
| GET /__health | 服务健康检查,基于依赖服务(富内容源、内部组件源等)的健康状态 |
| GET /__gtg | 服务就绪检查,指示服务是否可处理请求 |
| GET /__build-info | 返回服务构建信息 |
| GET /__metrics | 返回服务性能指标 |
当handler-path配置为非默认值(如internalcontent-preview)时,内容访问端点将自动调整为/{handler-path}/{uuid},例如:
http://localhost:8084/internalcontent-preview/9358ba1e-c07f-11e5-846f-79b0e3d20eaf

免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录方式配置轩辕镜像加速服务,包含7个详细步骤
在 Linux 系统上配置轩辕镜像源,支持主流发行版
在 Docker Desktop 中配置轩辕镜像加速,适用于桌面系统
在 Docker Compose 中使用轩辕镜像加速,支持容器编排
在 k8s 中配置 containerd 使用轩辕镜像加速
在宝塔面板中配置轩辕镜像加速,提升服务器管理效率
在 Synology 群晖NAS系统中配置轩辕镜像加速
在飞牛fnOS系统中配置轩辕镜像加速
在极空间NAS中配置轩辕镜像加速
在爱快ikuai系统中配置轩辕镜像加速
在绿联NAS系统中配置轩辕镜像加速
在威联通NAS系统中配置轩辕镜像加速
在 Podman 中配置轩辕镜像加速,支持多系统
配置轩辕镜像加速9大主流镜像仓库,包含详细配置步骤
无需登录即可使用轩辕镜像加速服务,更加便捷高效
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429