概述
本镜像基于GitHub源码https://github.com/prometheus/prometheus%E6%9E%84%E5%BB%BA%EF%BC%8C%E6%8F%90%E4%BE%9BPrometheus%E7%9B%91%E6%8E%A7%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%AE%B9%E5%99%A8%E5%8C%96%E9%83%A8%E7%BD%B2%E6%96%B9%E6%A1%88%E3%80%82Prometheus%E6%98%AF%E4%B8%80%E6%AC%BE%E5%BC%80%E6%BA%90%E7%9A%84%E7%B3%BB%E7%BB%9F%E7%9B%91%E6%8E%A7%E5%92%8C%E8%AD%A6%E6%8A%A5%E5%B7%A5%E5%85%B7%EF%BC%8C%E9%80%82%E7%94%A8%E4%BA%8E%E6%94%B6%E9%9B%86%E3%80%81%E5%AD%98%E5%82%A8%E5%92%8C%E5%88%86%E6%9E%90%E6%97%B6%E9%97%B4%E5%BA%8F%E5%88%97%E6%95%B0%E6%8D%AE%E3%80%82
核心特性
- 基于轻量级BusyBox操作系统,镜像体积小
- 支持多架构部署,包括arm32v5、arm32v7、arm64v8、amd64等
- 以非特权用户(nobody)运行,增强安全性
- 数据持久化存储路径为
/data/,配置文件路径为/etc/prometheus/
技术规格
| 项目 | 说明 |
|---|
| 操作系统 | https://hub.docker.com/_/busybox |
| 运行用户 | nobody (UID: 65534) |
| 运行组 | nogroup (GID: 65534) |
| 二进制文件位置 | /usr/sbin/ |
| TSDB存储路径 | /data/ |
| 配置文件路径 | /etc/prometheus/ |
使用方法
基本运行
使用默认配置启动Prometheus:
bash
docker run -d -p 9090:9090 --name prometheus [镜像名称]:[标签]
挂载自定义配置
将本地配置文件挂载到容器中:
bash
docker run -d -p 9090:9090 \
-v /path/to/your/prometheus.yml:/etc/prometheus/prometheus.yml \
--name prometheus [镜像名称]:[标签]
数据持久化
使用数据卷保存监控数据,避免容器重启后数据丢失:
bash
docker run -d -p 9090:9090 \
-v /path/to/your/prometheus.yml:/etc/prometheus/prometheus.yml \
-v prometheus-data:/data \
--name prometheus [镜像名称]:[标签]
Docker Compose配置示例
yaml
version: '3'
services:
prometheus:
image: [镜像名称]:[标签]
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/data
restart: always
volumes:
prometheus-data:
支持的标签及Dockerfile链接
- https://github.com/anzevalher/prometheus (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.14.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.14.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.13.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.13.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.13.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.12.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.12.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.11.2 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.11.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.11.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.11.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.10.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.10.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.9.2 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.9.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.9.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.9.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.8.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.8.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.8.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.7.2 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.7.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.7.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.7.0-rc.2 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.7.0-rc.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.7.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.6.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.6.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.6.0-rc.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.6.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.5.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.5.0-rc.2 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.5.0-rc.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.5.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.4.3 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.4.2 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.4.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.4.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.4.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.3.2 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.3.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.3.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.2.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.2.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.2.0-rc.1 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.2.0-rc.0 (Dockerfile)
- https://github.com/anzevalher/prometheus/tree/v2.1.0 (Dockerfile)
获取帮助
- 获取帮助:https://github.com/prometheus/prometheus
- 提交问题:https://github.com/anzevalher/prometheus
- 维护者:https://github.com/anzevalher/
- 支持架构:
arm32v5、arm32v7、arm64v8、amd64、ppc64le、s390x、i386