From 0e171eb452e49106b505bee80eb89164ccf94029 Mon Sep 17 00:00:00 2001 From: notquitetitan Date: Tue, 11 Apr 2023 12:23:02 -0500 Subject: [PATCH] Initial commit --- Dockerfile | 19 +++++++++++++++++++ dnsmasq.conf | 1 + docker-compose.yml | 14 ++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 Dockerfile create mode 100644 dnsmasq.conf create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a7a3b12 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# ARG ALPINE_VERSION=edge +FROM alpine:latest +RUN apk --no-cache add dnsmasq-dnssec +RUN mkdir -p /etc/dnsmasq.d +COPY dnsmasq.conf /etc/ +EXPOSE 53 53/udp +ENTRYPOINT ["/usr/sbin/dnsmasq", "-k"] + +# FROM alpine:latest + +# COPY dnsmasq.conf /etc/ + +# RUN mkdir -p /etc/dnsmasq.d + +# RUN apk --no-cache add dnsmasq-dnssec + +# EXPOSE 53 53/udp + +# ENTRYPOINT ["/usr/sbin/dnsmasq" "-k"] \ No newline at end of file diff --git a/dnsmasq.conf b/dnsmasq.conf new file mode 100644 index 0000000..65e9288 --- /dev/null +++ b/dnsmasq.conf @@ -0,0 +1 @@ +conf-dir=/etc/dnsmasq.d,*.conf \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b1d388a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3' +services: + dns: + restart: always + image: dnsmasq:latest + build: + context: . + volumes: + - ./dnsmasq:/etc/dnsmasq.d + ports: + - "53:53/tcp" + - "53:53/udp" + cap_add: + - NET_ADMIN \ No newline at end of file