1
0
forked from HPC/HPCplaybooks
HPCplaybooks/roles/cadvisor/templates/cadvisor.service

23 lines
531 B
Desktop File

[Unit]
Description=Prometheus container monitoring.
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker kill %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStart=/usr/bin/docker run --name %n \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--volume=/dev/disk/:/dev/disk:ro \
--publish=8181:8080 \
google/cadvisor:latest
[Install]
WantedBy=multi-user.target