mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
docs: minor corrections to the docker documentation (#6869)
The documentation referenced "data volume containers", which were superseded by named volume support in Docker several years ago. There were to bind-mounting examples in the docs that are effectively doing the same thing, but the description of the second was somewhat erroneous. Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
This commit is contained in:
parent
791b84830d
commit
e4cfa742a5
|
@ -27,9 +27,9 @@ prom/prometheus`. This starts Prometheus with a sample
|
||||||
configuration and exposes it on port 9090.
|
configuration and exposes it on port 9090.
|
||||||
|
|
||||||
The Prometheus image uses a volume to store the actual metrics. For
|
The Prometheus image uses a volume to store the actual metrics. For
|
||||||
production deployments it is highly recommended to use the
|
production deployments it is highly recommended to use a
|
||||||
[Data Volume Container](https://docs.docker.com/engine/admin/volumes/volumes/)
|
[named volume](https://docs.docker.com/storage/volumes/)
|
||||||
pattern to ease managing the data on Prometheus upgrades.
|
to ease managing the data on Prometheus upgrades.
|
||||||
|
|
||||||
To provide your own configuration, there are several options. Here are
|
To provide your own configuration, there are several options. Here are
|
||||||
two examples.
|
two examples.
|
||||||
|
@ -41,11 +41,12 @@ Bind-mount your `prometheus.yml` from the host by running:
|
||||||
```bash
|
```bash
|
||||||
docker run \
|
docker run \
|
||||||
-p 9090:9090 \
|
-p 9090:9090 \
|
||||||
-v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml \
|
-v /path/to/prometheus.yml:/etc/prometheus/prometheus.yml \
|
||||||
prom/prometheus
|
prom/prometheus
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use an additional volume for the config:
|
Or bind-mount the directory containing `prometheus.yml` onto
|
||||||
|
`/etc/prometheus` by running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run \
|
docker run \
|
||||||
|
|
Loading…
Reference in a new issue