How to persist data in Prometheus running in a Docker container?

Use the default data dir, which is /prometheus. To do that, use this line instead of what you have in your command:

...
--volume a-new-volume:/prometheus \
...

Found here: https://github.com/prometheus/prometheus/blob/master/Dockerfile

Surprisingly is not mentioned in the image docs

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)