
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
!size!https://raw.githubusercontent.com/11notes/static/refs/heads/master/img/markdown/transparent5x2px.png!pulls!https://raw.githubusercontent.com/11notes/static/refs/heads/master/img/markdown/transparent5x2px.png%5B](https://github.com/11notes/docker-prometheus/issues)!https://raw.githubusercontent.com/11notes/static/refs/heads/master/img/markdown/transparent5x2px.png!swiss_made
以无root权限和无发行版方式运行Prometheus
Prometheus是Cloud Native Computing Foundation项目,是一个系统和服务监控系统。它按指定间隔从配置的目标收集指标,评估规则表达式,显示结果,并在观察到指定条件时触发警报。
!https://github.com/11notes/docker-prometheus/blob/master/img/Graph.png?raw=true
此镜像能做什么? 该镜像以无root权限(https://github.com/11notes/RTFM/blob/main/linux/container/image/rootless.md)%E5%92%8C%E6%97%A0%E5%8F%91%E8%A1%8C%E7%89%88(https://github.com/11notes/RTFM/blob/main/linux/container/image/distroless.md)%E6%96%B9%E5%BC%8F%E8%BF%90%E8%A1%8CPrometheus%EF%BC%8C%E4%BB%A5%E5%AE%9E%E7%8E%B0%E6%9C%80%E9%AB%98%E5%AE%89%E5%85%A8%E6%80%A7%E5%92%8C%E6%80%A7%E8%83%BD%E3%80%82%E6%82%A8%E5%8F%AF%E4%BB%A5%E6%8F%90%E4%BE%9B%E8%87%AA%E5%B7%B1%E7%9A%84%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%EF%BC%8C%E6%88%96%E7%9B%B4%E6%8E%A5%E5%9C%A8compose%E4%B8%AD%E5%86%85%E8%81%94%E9%85%8D%E7%BD%AEPrometheus%E3%80%82%E8%BF%90%E8%A1%8Ccompose%E7%A4%BA%E4%BE%8B%E5%90%8E%EF%BC%8C%E5%8F%AF%E6%89%93%E5%BC%80%E4%BB%A5%E4%B8%8B%5BURL](http://localhost:3000/query?g0.expr=histogram_quantile%280.9%2C+sum+by+%28le%29+%28rate%28dnspyre_dns_requests_duration_seconds_bucket%5B1m%5D%29%29%29&g0.show_tree=0&g0.tab=graph&g0.range_input=1m&g0.res_type=auto&g0.res_density=medium&g0.display_mode=lines&g0.show_exemplars=0)查看DNS基准测试统计数据,效果如截图所示。
为何选择此镜像而非其他现有镜像? 原因如下:
如果您重视安全性、简洁性和极致优化,此镜像可能适合您。
以下是此镜像与最常用或官方镜像的对比:
| 镜像 | 磁盘大小 | 默认用户 | https://github.com/11notes/RTFM/blob/main/linux/container/image/distroless.md | 支持架构 |
|---|---|---|---|---|
| 11notes/prometheus | 66MB | 1000:1000 | ✅ | amd64, arm64, armv7 |
| prom/prometheus | 390MB | 65534:65534 | ❌ | amd64, arm64, armv7, ppc64le, riscv64, s390x |
yamlglobal: scrape_interval: 10s scrape_configs: - job_name: "prometheus" static_configs: - targets: ["localhost:3000"]
yamlname: "monitoring" x-lockdown: &lockdown # 防止对镜像本身的写访问 read_only: true # 防止容器内进程获取更多权限 security_opt: - "no-new-privileges=true" services: prometheus: depends_on: adguard: condition: "service_healthy" restart: true image: "11notes/prometheus:3.10.0" <<: *lockdown environment: TZ: "Europe/Zurich" PROMETHEUS_CONFIG: |- global: scrape_interval: 1s scrape_configs: - job_name: "dnspyre" static_configs: - targets: ["dnspyre:3000"] volumes: - "prometheus.etc:/prometheus/etc" - "prometheus.var:/prometheus/var" ports: - "3000:9090/tcp" networks: frontend: restart: "always" dnspyre: # 有关此镜像的更多信息,请查看: # https://github.com/11notes/docker-distroless # # 此镜像将对adguard执行100k(10 x 10000)次查询 # 以向Prometheus填充数据 depends_on: prometheus: condition: "service_healthy" restart: true image: "11notes/distroless:dnspyre" <<: *lockdown command: "--server adguard -c 10 -n 3 -t A --prometheus ':3000' https://raw.githubusercontent.com/11notes/static/refs/heads/master/src/benchmarks/dns/fqdn/10000" environment: TZ: "Europe/Zurich" networks: frontend: adguard: # 有关此镜像的更多信息,请查看: # https://github.com/11notes/docker-adguard image: "11notes/adguard:0.107.64" <<: *lockdown environment: TZ: "Europe/Zurich" volumes: - "adguard.etc:/adguard/etc" - "adguard.var:/adguard/var" tmpfs: - "/adguard/run:uid=1000,gid=1000" ports: - "53:53/udp" - "53:53/tcp" - "3010:3000/tcp" networks: frontend: sysctls: net.ipv4.ip_unprivileged_port_start: 53 restart: "always" volumes: prometheus.etc: prometheus.var: adguard.etc: adguard.var: networks: frontend:
若要了解如何更改此容器镜像的默认UID/GID,请参考https://github.com/11notes/RTFM/blob/main/linux/container/image/11notes/how-to.changeUIDGID.md#change-uidgid-the-correct-way%E3%80%82
| 参数 | 值 | 描述 |
|---|---|---|
user | docker | 用户名 |
uid | 1000 | 用户标识符 |
gid | 1000 | 组标识符 |
home | /prometheus | docker用户的主目录 |
| 参数 | 说明 | 默认值 |
|---|---|---|
TZ | 时区 | |
DEBUG | 激活容器镜像和应用的调试选项(如支持) | |
PROMETHEUS_CONFIG (可选) | 若设置,将用该变量值覆盖默认配置(https://github.com/11notes/RTFM/blob/master/linux/container/image/11notes/inline-config.md%EF%BC%89 |
以下是镜像的主要标签。此外,每个提交及其简写sha256值也有对应的标签。
我认为:latest标签是个坏习惯,不应使用。许多开发者在新版本中引入破坏性变更,这会给使用:latest的用户带来问题。如果不想将标签更改为最新语义化版本,可使用语义化版本的短版本。例如,不使用:3.10.0,可使用:3或:3.10。由于这些标签会在每个新版本中更新为软件的最新版本,使用它们与使用:latest类似,但至少固定在主版本或次版本,理论上不会引入破坏性变更。
如果仍坚持使用应用的最新版本,可使用:rolling标签,但请注意!您将立即获得应用的最新版本,无论是否存在破坏性变更或安全问题,风险自负!
docker pull 11notes/prometheus:3.10.0 docker pull ghcr.io/11notes/prometheus:3.10.0 docker pull quay.io/11notes/prometheus:3.10.0
此镜像默认支持Unraid。只需在任何标签后添加**-unraid**,镜像将以99:100而非1000:1000运行。
此镜像默认支持nobody用户。只需在任何标签后添加**-nobody**,镜像将以65534:65534而非1000:1000运行。
此镜像不基于其他镜像,而是以https://hub.docker.com/_/scratch%E4%BD%9C%E4%B8%BA%E5%9F%BA%E7%A1%80%E5%B1%82%E3%80%82 镜像包含以下无发行版层:
此镜像按"现状"提供,风险自负。更新镜像版本前请务必备份。查看https://github.com/11notes/docker-prometheus/releases%E4%BA%86%E8%A7%A3%E7%A0%B4%E5%9D%8F%E6%80%A7%E5%8F%98%E6%9B%B4%E3%80%82%E4%BD%BF%E7%94%A8%E6%AD%A4%E9%95%9C%E5%83%8F%E9%81%87%E5%88%B0%E9%97%AE%E9%A2%98%E8%AF%B7%E6%8F%90%E4%BA%A4https://github.com/11notes/docker-prometheus/issues%E3%80%82%E5%A6%82%E6%9C%89%E9%97%AE%E9%A2%98%E6%88%96%E5%BB%BA%E8%AE%AE%EF%BC%8C%E8%AF%B7%E5%88%9B%E5%BB%BAhttps://github.com/11notes/docker-prometheus/discussions%E8%80%8C%E9%9D%9Eissue%E3%80%82%E5%8F%AF%E5%9C%A8https://github.com/11notes?tab=repositories%E6%9F%A5%E7%9C%8B%E6%88%91%E7%9A%84%E6%89%80%E6%9C%89%E5%85%B6%E4%BB%96%E4%BB%93%E5%BA%93%E3%80%82
创建于 11.03.2026, 21:10:44 (CET)
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 11notes/prometheus 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: