aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorTheMickeyMike2022-07-05 08:20:32 +0200
committerTheMickeyMike2022-07-05 08:20:32 +0200
commit23cf3206314b8adc4047392ef0f2b81b26e534e0 (patch)
tree76b5d393911f87bbc855f11ee87efb434e300b0e /Dockerfile
parentf7e15ae6b1046e2b018e6e47adc4a4139284b871 (diff)
Push all work to master
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..7e6de36
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,20 @@
+FROM alpine AS builder
+ARG MDNS_REPEATER_VERSION=local
+ADD mdns-repeater.c mdns-repeater.c
+RUN set -ex && \
+ apk add build-base && \
+ gcc -o /bin/mdns-repeater mdns-repeater.c -DMDNS_REPEATER_VERSION=\"${MDNS_REPEATER_VERSION}\"
+
+FROM alpine
+
+RUN set -ex && \
+ apk add 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"]
+CMD ["/bin/mdns-repeater", "-f", "eth0.20", "eth0.100"]