Run haproxy-statsd as uid 1000

This aligns it with what we have done for zookeeper-statsd.

Change-Id: Ida0e3c3e7dbcaf915119f7e2677edf95c7550eea
This commit is contained in:
Clark Boylan 2021-11-04 15:50:10 -07:00 committed by Clark Boylan
parent fd0aba7445
commit 2828a51ef9
2 changed files with 13 additions and 0 deletions

View File

@ -17,4 +17,16 @@ FROM docker.io/opendevorg/python-base:3.9-bullseye
COPY haproxy-statsd.py /usr/local/bin
RUN pip install statsd
# 1000 is what haproxy's stats socket defaults to.
RUN addgroup haproxy --gid 1000 --system \
&& adduser \
--system \
--uid 1000 \
--home /home/haproxy \
--shell /bin/bash \
--ingroup haproxy \
haproxy
USER 1000:1000
CMD ["/usr/local/bin/haproxy-statsd.py"]

View File

@ -46,6 +46,7 @@ services:
restart: always
image: docker.io/opendevorg/haproxy-statsd:latest
network_mode: host
user: "1000:1000"
volumes:
- /var/haproxy/run:/var/haproxy/run
environment: