[Unit] Description=A prometheus container After=time-sync.target Wants=time-sync.target systemd-time-wait-sync.service [Container] ContainerName=prometheus Image=docker.io/prom/prometheus:latest Network=pasta:-T,9091:9091,-T,9882:9882,-T,9883:9883,-T,9100:9100,-T,5001:5001 PublishPort=127.0.0.1:9090:9090 Volume=prometheus-data:/var/lib/prometheus Volume=%h/.config/containers/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro Volume=/etc/prometheus/targets.d:/etc/prometheus/targets.d:ro [Service] Restart=on-failure RestartSec=10s RestartSteps=5 RestartMaxDelaySec=1min TimeoutStartSec=15min [Install] WantedBy=default.target