Skip to content

Commit 326384b

Browse files
committed
fix HasLicense and RunAsNonRoot
1 parent 46199e2 commit 326384b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ RUN microdnf update -y
55
# If you edit this version number, edit it here *and* the LABEL below:
66
RUN microdnf install -y haproxy22
77

8+
# Creating haproxy user and group
9+
RUN microdnf install -y shadow-utils
10+
RUN groupadd haproxygroup
11+
RUN useradd -g haproxygroup haproxyuser
12+
813
LABEL maintainer="Guillaume Abrioux <[email protected]>"
914
LABEL com.redhat.component="rhceph-haproxy-container"
1015
LABEL name="haproxy"
@@ -26,4 +31,6 @@ COPY docker-entrypoint.sh /usr/local/bin/
2631
RUN ln -s usr/local/bin/docker-entrypoint.sh /
2732
ENTRYPOINT ["docker-entrypoint.sh"]
2833

34+
USER haproxyuser
35+
2936
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

0 commit comments

Comments
 (0)