--- volumes: prometheus-data: driver: local services: prometheus: image: docker.io/prom/prometheus:v3.4.0 container_name: prometheus ports: - 10.0.0.1:9090:9090 command: --config.file=/etc/prometheus/prometheus.yaml volumes: - ./config/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro - prometheus-data:/prometheus restart: unless-stopped networks: {} ...