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