diff --git a/dnsmasq/Dockerfile b/dnsmasq/Dockerfile new file mode 100644 index 0000000..a3af5c2 --- /dev/null +++ b/dnsmasq/Dockerfile @@ -0,0 +1,18 @@ +# +# Dockerfile for dnsmasq +# + +FROM alpine +MAINTAINER kev + +RUN set -xe \ + && apk add -U dnsmasq \ + && echo "conf-dir=/etc/dnsmasq.d/,*.conf" >> /etc/dnsmasq.conf \ + && mkdir -p /etc/dnsmasq.d \ + && rm -rf /var/cache/apk/* + +VOLUME /etc/dnsmasq.d + +EXPOSE 53/tcp 53/udp 67/udp + +ENTRYPOINT ["/usr/sbin/dnsmasq", "--user=dnsmasq", "--group=dnsmasq"] diff --git a/dnsmasq/README.md b/dnsmasq/README.md new file mode 100644 index 0000000..8a9f650 --- /dev/null +++ b/dnsmasq/README.md @@ -0,0 +1,2 @@ +dnsmasq +======= diff --git a/dnsmasq/dnsmasq.d/README b/dnsmasq/dnsmasq.d/README new file mode 100644 index 0000000..aa2788b --- /dev/null +++ b/dnsmasq/dnsmasq.d/README @@ -0,0 +1,4 @@ +# All files in this directory which end in .conf +# will be read by dnsmasq as configuration files +# +# This can be changed by editing /etc/dnsmasq.conf diff --git a/dnsmasq/dnsmasq.d/ads.conf b/dnsmasq/dnsmasq.d/ads.conf new file mode 100644 index 0000000..1b23585 --- /dev/null +++ b/dnsmasq/dnsmasq.d/ads.conf @@ -0,0 +1 @@ +# server=/duobao999.com/ diff --git a/dnsmasq/dnsmasq.d/hosts.conf b/dnsmasq/dnsmasq.d/hosts.conf new file mode 100644 index 0000000..86068b2 --- /dev/null +++ b/dnsmasq/dnsmasq.d/hosts.conf @@ -0,0 +1 @@ +# host-record=google,8.8.8.8 diff --git a/dnsmasq/dnsmasq.d/nxdomains.conf b/dnsmasq/dnsmasq.d/nxdomains.conf new file mode 100644 index 0000000..66c3cfa --- /dev/null +++ b/dnsmasq/dnsmasq.d/nxdomains.conf @@ -0,0 +1,2 @@ +# bogus-nxdomain=202.102.110.203 +# bogus-nxdomain=202.102.110.204 diff --git a/dnsmasq/dnsmasq.d/settings.conf b/dnsmasq/dnsmasq.d/settings.conf new file mode 100644 index 0000000..73ae3b1 --- /dev/null +++ b/dnsmasq/dnsmasq.d/settings.conf @@ -0,0 +1,4 @@ +# no-hosts +# no-resolv +# cache-size=10000 +# server=127.0.0.1#2053 diff --git a/dnsmasq/docker-compose.yml b/dnsmasq/docker-compose.yml new file mode 100644 index 0000000..e69de29