aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: da59424b106002ed0a116934c1b86ef5d2bff44c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM alpine AS builder
ARG MDNS_REPEATER_VERSION=local
ADD 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
RUN chmod +x /bin/mdns-repeater
RUN setcap cap_net_raw=+ep /bin/mdns-repeater

COPY run.sh /app/
RUN chmod +x /app/run.sh

ENTRYPOINT /app/run.sh "${VLANS}"