From bb843eece805f1e6744595e3c528f33b895d8f21 Mon Sep 17 00:00:00 2001 From: kev Date: Tue, 12 Jul 2016 13:43:54 +0800 Subject: [PATCH] update dnsmasq --- README.md | 1 + dnsmasq/Dockerfile | 13 ++++++------ dnsmasq/README.md | 21 +++++++++++++++++++ dnsmasq/arm/Dockerfile | 19 +++++++++++++++++ .../{dnsmasq.d/settings.conf => dnsmasq.conf} | 0 dnsmasq/arm/docker-compose.yml | 2 +- 6 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 dnsmasq/arm/Dockerfile rename dnsmasq/arm/{dnsmasq.d/settings.conf => dnsmasq.conf} (100%) diff --git a/README.md b/README.md index 8294530..9132dce 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ A collection of delicious docker recipes. - [ ] ipset - [ ] irc - [ ] libreswan +- [ ] metasploit - [ ] mitmproxy - [ ] nagios - [ ] nfs diff --git a/dnsmasq/Dockerfile b/dnsmasq/Dockerfile index 2f701bd..46cd22d 100644 --- a/dnsmasq/Dockerfile +++ b/dnsmasq/Dockerfile @@ -3,16 +3,17 @@ # 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/* + && apk add --no-cache dnsmasq \ + && echo "conf-dir=/etc/dnsmasq.d/,*.conf" >> /etc/dnsmasq.conf VOLUME /etc/dnsmasq.d -EXPOSE 53/tcp 53/udp 67/udp +EXPOSE 53/tcp \ + 53/udp \ + 67/udp -ENTRYPOINT ["/usr/sbin/dnsmasq", "--no-daemon", "--user=dnsmasq", "--group=dnsmasq"] +ENTRYPOINT ["dnsmasq", "--no-daemon", "--user=dnsmasq", "--group=dnsmasq"] diff --git a/dnsmasq/README.md b/dnsmasq/README.md index 8a9f650..555f229 100644 --- a/dnsmasq/README.md +++ b/dnsmasq/README.md @@ -1,2 +1,23 @@ dnsmasq ======= + +[Dnsmasq][1] is a Domain Name System forwarder and Dynamic Host Configuration +Protocol server for small computer networks, created as free software. + +## docker-compose.yml + +```yaml +dnsmasq: + image: vimagick/dnsmasq + ports: + - "53:53/tcp" + - "53:53/udp" + - "67:67/udp" + volumes: + - ./dnsmasq.d:/etc/dnsmasq.d + cap_add: + - NET_ADMIN + restart: always +``` + +[1]: http://www.thekelleys.org.uk/dnsmasq/doc.html diff --git a/dnsmasq/arm/Dockerfile b/dnsmasq/arm/Dockerfile new file mode 100644 index 0000000..a338eea --- /dev/null +++ b/dnsmasq/arm/Dockerfile @@ -0,0 +1,19 @@ +# +# Dockerfile for dnsmasq-arm +# + +FROM easypi/alpine-arm + +MAINTAINER EasyPi Software Foundation + +RUN set -xe \ + && apk add --no-cache dnsmasq \ + && echo "conf-dir=/etc/dnsmasq.d/,*.conf" >> /etc/dnsmasq.conf + +VOLUME /etc/dnsmasq.d + +EXPOSE 53/tcp \ + 53/udp \ + 67/udp + +ENTRYPOINT ["dnsmasq", "--no-daemon", "--user=dnsmasq", "--group=dnsmasq"] diff --git a/dnsmasq/arm/dnsmasq.d/settings.conf b/dnsmasq/arm/dnsmasq.conf similarity index 100% rename from dnsmasq/arm/dnsmasq.d/settings.conf rename to dnsmasq/arm/dnsmasq.conf diff --git a/dnsmasq/arm/docker-compose.yml b/dnsmasq/arm/docker-compose.yml index 33de603..b7b7312 100644 --- a/dnsmasq/arm/docker-compose.yml +++ b/dnsmasq/arm/docker-compose.yml @@ -1,7 +1,7 @@ dnsmasq: image: easypi/dnsmasq-arm volumes: - - ./dnsmasq.d:/etc/dnsmasq.d + - ./dnsmasq.conf:/etc/dnsmasq.d/dnsmasq.conf net: container:dnscrypt restart: always