diff --git a/Dockerfile b/Dockerfile index 34ea074..d403e6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,4 +20,7 @@ RUN addgroup exporter &&\ USER exporter -ENTRYPOINT [ "/bin/mesos-exporter" ] +ENV MODE ${MODE} +ENV URL ${URL} + +ENTRYPOINT ./bin/mesos-exporter -master "$URL" diff --git a/README.md b/README.md index 6bd5eac..c9c3698 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,16 @@ When using HTTP or strict mode authentication, the following values are read fro - `MESOS_EXPORTER_PASSWORD` - `MESOS_EXPORTER_PRIVATE_KEY` +## Docker +```sh +Usage of docker: + +For Master +docker run --net="host" -e MODE=-master -e URL=http://localhost:5050 -p 9015:9015 mesos_exporter:latest + +For Slave +docker run --net="host" -e MODE=-slave -e URL=http://localhost:5051 -p 9015:9015 mesos_exporter:latest +``` ## Prometheus Configuration