Skip to content

Instantly share code, notes, and snippets.

@ideaengine007
Last active May 8, 2024 10:12
Show Gist options
  • Save ideaengine007/84f856bd7cb99dca669cc7e7618428d8 to your computer and use it in GitHub Desktop.
Save ideaengine007/84f856bd7cb99dca669cc7e7618428d8 to your computer and use it in GitHub Desktop.
Docker Compose YAML for observing environment variables being logged as metrics in cAdvisor
services:
ubuntu:
container_name: ubuntu
image: ubuntu:latest
command: sleep infinity
environment:
- DEBUG=true
- AWS=ASIA1234567890
cadvisor:
container_name: cadvisor
image: gcr.io/cadvisor/cadvisor:v0.47.2
ports:
- "8080:8080"
command: --env_metadata_whitelist=D,A
volumes:
- "/:/rootfs"
- "/var/run:/var/run"
- "/sys:/sys"
- "/var/snap/docker/common/var-lib-docker:/var/lib/docker:ro"
- "/dev/disk/:/dev/disk"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment