本站支持搜索的镜像仓库:Docker Hub、gcr.io、ghcr.io、quay.io、k8s.gcr.io、registry.gcr.io、elastic.co、mcr.microsoft.com
本镜像是基于官方Graphite镜像(graphiteapp/graphite-statsd)的封装版本,专为配合sitespeed.io工具设计,支持快速部署Graphite(1.1.3版本)并优化指标存储配置。镜像默认启用Basic Auth认证,固定数据存储目录,可直接用于收集、存储sitespeed.io生成的性能指标,也可通过自定义配置适配其他监控场景。
/opt/graphite/storage/whisper,支持外部挂载实现数据持久化。storage-schemas.conf和storage-aggregation.conf文件,调整指标存储周期和聚合规则。使用默认的guest/guest认证凭证启动容器,仅用于测试环境:
docker run -d \ --name graphite \ -p 8080:80 \ # Web界面端口(映射到宿主机8080) -p 2003:2003 \ # 指标接收端口(Carbon缓存端口) sitespeedio/graphite
注意:默认认证安全性低,生产环境需替换为自定义.htpasswd文件。
通过挂载宿主机的.htpasswd文件替换默认认证凭证,步骤如下:
htpasswd工具创建(参考Apache文档):
htpasswd -c /local/path/to/.htpasswd <用户名> # 按提示输入密码
docker run -d \ --name graphite \ -p 8080:80 \ -p 2003:2003 \ -v /local/path/to/.htpasswd:/etc/nginx/.htpasswd \ # 挂载自定义认证文件 sitespeedio/graphite
为避免容器重启导致数据丢失,需将Graphite的whisper数据目录挂载到宿主机:
docker run -d \ --name graphite \ -p 8080:80 \ -p 2003:2003 \ -v /local/path/to/.htpasswd:/etc/nginx/.htpasswd \ # 自定义认证 -v /path/to/whisper:/opt/graphite/storage/whisper \ # 持久化数据目录 sitespeedio/graphite
默认存储策略为retentions = 10m:60d,30m:90d(10分钟/点存储60天,30分钟/点存储90天,共3个月数据)。如需调整(如延长存储周期),可通过挂载自定义storage-schemas.conf文件实现:
创建storage-schemas.conf文件,示例内容(存储1年数据):
[default_1min_for_1year] pattern = .* retentions = 10m:180d, 30m:365d # 10分钟/点存180天,30分钟/点存365天
docker run -d \ --name graphite \ -p 8080:80 \ -p 2003:2003 \ -v /local/path/to/.htpasswd:/etc/nginx/.htpasswd \ -v /path/to/whisper:/opt/graphite/storage/whisper \ -v /path/to/storage-schemas.conf:/opt/graphite/conf/storage-schemas.conf \ # 挂载自定义存储策略 sitespeedio/graphite
创建docker-compose.yml文件,整合认证、数据持久化和自定义存储策略:
version: '3' services: graphite: image: sitespeedio/graphite container_name: graphite ports: - "8080:80" - "2003:2003" volumes: - /local/path/to/.htpasswd:/etc/nginx/.htpasswd # 自定义认证 - /path/to/whisper:/opt/graphite/storage/whisper # 数据持久化 - /path/to/storage-schemas.conf:/opt/graphite/conf/storage-schemas.conf # 自定义存储策略 restart: unless-stopped # 容器退出时自动重启
启动命令:docker-compose up -d
| 挂载路径 | 用途说明 |
|---|---|
/etc/nginx/.htpasswd | Basic Auth认证文件,格式为用户名:加密密码(需通过htpasswd工具生成)。 |
/opt/graphite/storage/whisper | Graphite数据存储目录(Whisper数据库),挂载后数据可持久化。 |
/opt/graphite/conf/storage-schemas.conf | 指标存储策略配置文件,定义不同指标的采样间隔和保留周期。 |
/opt/graphite/conf/storage-aggregation.conf | 指标聚合规则配置文件,定义历史数据如何合并(如平均值、最大值)。 |
本镜像基于官方Graphite镜像graphiteapp/graphite-statsd构建,继承其核心组件(Carbon、Whisper、Graphite Web),并添加sitespeed.io适配配置。
免费版仅支持 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