
!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 镜像,适用于 不同场景 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 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 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务