Container metrics of the base platform: cAdvisor built from source, Docker via a read-only proxy
558
The container metrics of the base platform: cAdvisor, built from source. It reports per container CPU, memory, network, health and start time.
Not a general-purpose cAdvisor image. Its flags fit one specific platform. The repository is public only so that the host can pull without credentials. For your own projects, use the official image.
One tag per release, X.Y.Z, the same version as the other base-* images of that release. There is
no latest: deployments reference a version and its digest.
Platforms: linux/amd64, linux/arm64.
wget for the healthcheckIt talks to Docker over TCP at socket-proxy:2375, never to the socket itself: put a proxy there that
allows only reading requests. It needs three read-only mounts and no access to Docker's data
directory:
| Host path | Container path | Why |
|---|---|---|
/sys/fs/cgroup | /sys/fs/cgroup | CPU and memory per container |
/proc | /rootfs/proc | network per container |
<DockerRootDir>/image/<driver>/layerdb/mounts | the same path below /rootfs | to name the containers |
<DockerRootDir> and <driver> come from docker info; on most hosts the path is
/var/lib/docker/image/overlay2/layerdb/mounts.
Port: 8080, meant for an internal Docker network only, never published.
services:
cadvisor:
image: christianmaier/base-cadvisor:X.Y.Z
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /proc:/rootfs/proc:ro
- /var/lib/docker/image/overlay2/layerdb/mounts:/rootfs/var/lib/docker/image/overlay2/layerdb/mounts:ro
networks: [observability, docker-api]
read_only: true
cap_drop: ["ALL"]
security_opt: ["no-new-privileges:true"]
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8080/healthz"]
networks:
observability:
internal: true
docker-api:
internal: true
container_health_state is 1 for healthy, 0 for starting or unhealthy and -1 for a container without
a healthcheck.
nobody, needs no capabilities, read-only root filesystemContent type
Image
Digest
sha256:4c31467f6…
Size
22.1 MB
Last updated
1 day ago
docker pull christianmaier/base-cadvisor:2.9.4