This repository works in support of the
behemphi/docker-prometheus-server repo.
It provides a dedicated, always running, container to persist the volatile
Prometheus configuration file.
Running this container is trival, but also very uninteresting without the use of the Prometheus server.
Note that the name of the container is important when mounting it to a Prometheus server container later.
docker run \
--detach \
--name prom-server-config \
--restart=always \
--volume /stackengine \
behemphi/prom-server-config
Be sure the name of the service (not the container) is a direct match for
with the service named in the volumes_from: parameter of the Prometheus
server.
prom-server-config:
container_name: prom-server-config
image: behemphi/prom-server-config
restart: always
volumes:
- /stackengineWhile it is perfectly valid to have stopped container as a dedicated data container, this comes with certain problems.
This container is designed to always be running so that a reaping process does not remove it inadvertantly.
See behemphi/docker-prometheus-server.
Note the use of the scratch base container in the Dockerfile. This is a great
way to build tiny containers when you have the luxury of working with
staticly compiled binaries. In this case we have a trivial Golang for loop.
MIT