ci: DL3019

This commit is contained in:
Michael Grote 2023-06-10 10:51:28 +02:00
parent bbd51013f1
commit 1d99f964f4

View file

@ -2,13 +2,13 @@ FROM alpine AS builder
ARG MDNS_REPEATER_VERSION=local ARG MDNS_REPEATER_VERSION=local
ADD mdns-repeater.c mdns-repeater.c ADD mdns-repeater.c mdns-repeater.c
RUN set -ex && \ RUN set -ex && \
apk add build-base && \ apk add --no-cache build-base && \
gcc -o /bin/mdns-repeater mdns-repeater.c -DMDNS_REPEATER_VERSION=\"${MDNS_REPEATER_VERSION}\" gcc -o /bin/mdns-repeater mdns-repeater.c -DMDNS_REPEATER_VERSION=\"${MDNS_REPEATER_VERSION}\"
FROM alpine FROM alpine
RUN set -ex && \ RUN set -ex && \
apk add vlan libcap bash apk add --no-cache vlan libcap bash
COPY --from=builder /bin/mdns-repeater /bin/mdns-repeater COPY --from=builder /bin/mdns-repeater /bin/mdns-repeater
RUN chmod +x /bin/mdns-repeater RUN chmod +x /bin/mdns-repeater
RUN setcap cap_net_raw=+ep /bin/mdns-repeater RUN setcap cap_net_raw=+ep /bin/mdns-repeater