Run zookeeper-statsd as the zookeeper user

We may as well align it with the other processes running on this system.

Change-Id: I6de0e5463b3dc66eae46a771d70d1d741527a35e
This commit is contained in:
Clark Boylan 2021-11-04 15:37:25 -07:00
parent 4e84d29e38
commit 47cbfbf96a
2 changed files with 14 additions and 0 deletions

View File

@ -18,4 +18,17 @@ FROM docker.io/opendevorg/python-base:3.7
COPY zookeeper-statsd.py /usr/local/bin
RUN pip install statsd
# 10001 is what we default to in our playbooks when deploying
# zookeeper proper.
RUN addgroup zookeeper --gid 10001 --system \
&& adduser \
--system \
--uid 10001 \
--home /home/zookeeper \
--shell /bin/bash \
--ingroup zookeeper \
zookeeper
USER 10001:10001
CMD ["/usr/local/bin/zookeeper-statsd.py"]

View File

@ -18,6 +18,7 @@ services:
restart: always
image: docker.io/opendevorg/zookeeper-statsd:latest
network_mode: host
user: "10001:10001"
environment:
STATSD_HOST: graphite.opendev.org
STATSD_PORT: 8125