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

19 lines
641 B
Text
Raw Normal View History

2024-02-07 21:23:47 +01:00
FROM alpine:20231219 AS builder
2022-07-05 08:20:32 +02:00
ARG MDNS_REPEATER_VERSION=local
2023-06-10 10:56:16 +02:00
WORKDIR /
2023-06-10 10:54:58 +02:00
COPY mdns-repeater.c mdns-repeater.c
2023-06-10 10:58:26 +02:00
# hadolint ignore=DL3018
2022-07-05 08:20:32 +02:00
RUN set -ex && \
2023-06-10 10:51:28 +02:00
apk add --no-cache build-base && \
2022-07-05 08:20:32 +02:00
gcc -o /bin/mdns-repeater mdns-repeater.c -DMDNS_REPEATER_VERSION=\"${MDNS_REPEATER_VERSION}\"
2024-02-07 21:32:04 +01:00
FROM alpine:20231219
2023-06-10 10:58:26 +02:00
# hadolint ignore=DL3018
2022-07-05 08:20:32 +02:00
RUN set -ex && \
2023-06-10 10:51:28 +02:00
apk add --no-cache vlan libcap bash
2022-07-05 08:20:32 +02:00
COPY --from=builder /bin/mdns-repeater /bin/mdns-repeater
COPY run.sh /app/
2023-06-10 10:53:31 +02:00
RUN chmod +x /bin/mdns-repeater && setcap cap_net_raw=+ep /bin/mdns-repeater && chmod +x /app/run.sh
2023-06-10 11:03:35 +02:00
# hadolint ignore=DL3025
2023-06-19 11:13:33 +02:00
ENTRYPOINT /bin/bash /app/run.sh "${VLANS}"