This repository has been archived on 2024-06-05. You can view files and clone it, but cannot push or open issues or pull requests.
mdns-repeater-mikrotik/Dockerfile
2023-06-10 10:54:58 +02:00

16 lines
535 B
Docker

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