From 7c7acbaac3af7ab897a87028eacca32f29651d51 Mon Sep 17 00:00:00 2001 From: wwya Date: Mon, 23 Mar 2026 10:07:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20docker-compose/prometheus/?= =?UTF-8?q?cadvisor/cadvisor.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../prometheus/cadvisor/cadvisor.yaml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docker-compose/prometheus/cadvisor/cadvisor.yaml diff --git a/docker-compose/prometheus/cadvisor/cadvisor.yaml b/docker-compose/prometheus/cadvisor/cadvisor.yaml new file mode 100644 index 0000000..fe8b566 --- /dev/null +++ b/docker-compose/prometheus/cadvisor/cadvisor.yaml @@ -0,0 +1,27 @@ +version: '3.8' +services: + cadvisor: + image: ghcr.io/google/cadvisor:0.56.2 + container_name: cadvisor + privileged: true + ports: + - "8080:8080" + volumes: + - /var/run:/var/run:ro + - /var/lib/docker/:/var/lib/docker:ro + - /sys:/sys:ro + - /:/rootfs:ro + - /dev/disk:/dev/disk:ro + network_mode: host + restart: always + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:8080/healthz"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 10s + deploy: + resources: + limits: + cpus: '0.2' + memory: 256M \ No newline at end of file