Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add net bind capability to haproxy bin #1096

Merged
merged 1 commit into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ FROM haproxy:2.6.16-alpine

USER root

RUN apk upgrade --no-cache && apk --no-cache add socat openssl lua5.3 lua-json4 dumb-init
RUN apk upgrade --no-cache && apk --no-cache add libcap-utils socat openssl lua5.3 lua-json4 dumb-init

COPY rootfs/ /
COPY --from=builder /src/haproxy-ingress /haproxy-ingress-controller

RUN mkdir -p /var/empty /etc/haproxy /var/lib/haproxy /var/run/haproxy\
&& chown -R haproxy:haproxy /etc/haproxy /var/lib/haproxy /var/run/haproxy\
&& chmod 0 /var/empty
&& chmod 0 /var/empty\
&& setcap 'cap_net_bind_service=+ep' /usr/local/sbin/haproxy

STOPSIGNAL SIGTERM
USER haproxy
Expand Down
5 changes: 3 additions & 2 deletions rootfs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ FROM haproxy:2.6.16-alpine

USER root

RUN apk upgrade --no-cache && apk --no-cache add socat openssl lua5.3 lua-json4 dumb-init
RUN apk upgrade --no-cache && apk --no-cache add libcap-utils socat openssl lua5.3 lua-json4 dumb-init

COPY . /

RUN mkdir -p /var/empty /etc/haproxy /var/lib/haproxy /var/run/haproxy\
&& chown -R haproxy:haproxy /etc/haproxy /var/lib/haproxy /var/run/haproxy\
&& chmod 0 /var/empty
&& chmod 0 /var/empty\
&& setcap 'cap_net_bind_service=+ep' /usr/local/sbin/haproxy

STOPSIGNAL SIGTERM
USER haproxy
Expand Down
Loading