
Internal Content API用于提供已发布内容,包含内部组件和富内容字段的聚合结果,通过整合富内容源与内部组件源的信息,为客户端提供完整的内部内容访问服务。
unrollContent参数,支持动态内容、图片等资源的展开功能适用于需要访问包含内部组件的已发布内容的服务场景,如内容管理系统、内部内容预览平台、内容分析工具等,尤其适合需要整合富内容与内部组件数据的业务系统。
bash# 假设镜像名称为internal-content-api,具体请替换为实际镜像仓库地址 docker pull internal-content-api:latest
基本运行命令
bashdocker run -d \ -p 8084:8084 \ --name internal-content-api \ internal-content-api:latest \ --app-port "8084" \ --handler-path "internalcontent" \ --content-source-uri "http://content-source:8080/__enriched-content-read-api/enrichedcontent" \ --internal-components-source-uri "http://internal-components-source:8080/__content-public-read/internalcontent" \ --content-source-app-name "Content Source Service" \ --internal-components-source-app-name "Internal Components Source Service" \ --content-source-app-health-uri "http://content-source:8080/__enriched-content-read-api/__health" \ --internal-components-source-app-health-uri "http://internal-components-source:8080/__content-public-read/__health" \ --content-unroller-app-name "Content Unroller" \ --content-unroller-uri "http://content-unroller:8080/__content-unroller-api/internalcontent" \ --content-unroller-app-health-uri "http://content-unroller:8080/__content-unroller-api/__health"
配置参数说明
| 参数名 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|
| --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 | 否 | - |
前提条件
安装与构建
bash# 获取源码 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 .
启动服务
bash# 安装二进制 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的内部内容(富内容与内部组件的聚合结果)。
请求示例
bashcurl -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 登录认证访问私有仓库
无需登录使用专属域名
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 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务