How to persist data in Prometheus running in a Docker container?
问题 I'm developing something that needs Prometheus to persist its data between restarts. Having followed the instructions $ docker volume create a-new-volume $ docker run \ --publish 9090:9090 \ --volume a-new-volume:/prometheus-data \ --volume "$(pwd)"/prometheus.yml:/etc/prometheus/prometheus.yml \ prom/prometheus I have a valid prometheus.yml in the right directory on the host machine and it's being read by Prometheus from within the container. I'm just scraping a couple of HTTP endpoints for