Skip to content

Instantly share code, notes, and snippets.

@arsalanses
Last active October 12, 2025 09:55
Show Gist options
  • Select an option

  • Save arsalanses/faa37f3a876e312a26bf326d681f9db9 to your computer and use it in GitHub Desktop.

Select an option

Save arsalanses/faa37f3a876e312a26bf326d681f9db9 to your computer and use it in GitHub Desktop.
cadvisor
services:
cadvisor:
container_name: cadvisor
hostname: cadvisor
image: gcr.io/cadvisor/cadvisor:${CADVISOR_VERSION}
restart: unless-stopped
privileged: true
networks:
backend: null # backend communications
caddy_caddynet: null # frontend communications (web UI)
expose:
- 8080
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/machine-id:/etc/machine-id:ro
- /:/rootfs:ro
- /dev/disk/:/dev/disk:ro
- /sys:/sys:ro
- /var/run:/var/run:ro
- /var/lib/docker/:/var/lib/docker:ro
- ./htpasswd:/etc/cadvisor/htpasswd:ro
command:
- --storage_duration=5m0s
- --housekeeping_interval=60s
- --docker_only=true
- --enable_metrics=cpu,memory,network
- --http_auth_file=/etc/cadvisor/htpasswd
- --http_auth_realm=cAdvisor
# https://devopstbz.s3.ir-thr-at1.arvanstorage.ir/registry/cadvisor.tar
# docker load < cadvisor.tar
admin:$apr1$rmoet0nb$MwPQf6HNFvoUUkROlGadu1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment