Don't run docker container as root

Run statsd_exporter as `nobody`.

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Ben Kochie 2019-04-17 17:04:19 +02:00
parent f0feef950b
commit 38df95f440
No known key found for this signature in database
GPG key ID: 7D88366AC0FCE38A

View file

@ -3,6 +3,7 @@ LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com
COPY statsd_exporter /bin/statsd_exporter COPY statsd_exporter /bin/statsd_exporter
USER nobody
EXPOSE 9102 9125 9125/udp EXPOSE 9102 9125 9125/udp
HEALTHCHECK CMD wget --spider -S "http://localhost:9102/metrics" -T 60 2>&1 || exit 1 HEALTHCHECK CMD wget --spider -S "http://localhost:9102/metrics" -T 60 2>&1 || exit 1
ENTRYPOINT [ "/bin/statsd_exporter" ] ENTRYPOINT [ "/bin/statsd_exporter" ]