diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 482f21a..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -agentd \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6627180..06d7898 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:edge LABEL maintainer="dev@jpillora.com" # webproc release settings -ENV WEBPROC_VERSION 0.1.9 +ENV WEBPROC_VERSION 0.2.2 ENV WEBPROC_URL https://github.com/jpillora/webproc/releases/download/$WEBPROC_VERSION/webproc_linux_amd64.gz # fetch dnsmasq and webproc binary RUN apk update \ @@ -11,7 +11,7 @@ RUN apk update \ && chmod +x /usr/local/bin/webproc \ && apk del .build-deps #configure dnsmasq -run mkdir -p /etc/default/ +RUN mkdir -p /etc/default/ RUN echo -e "ENABLED=1\nIGNORE_RESOLVCONF=yes" > /etc/default/dnsmasq COPY dnsmasq.conf /etc/dnsmasq.conf #run! diff --git a/LICENSE b/LICENSE index ecc9906..5bde064 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Jaime Pillora +Copyright (c) 2018 Jaime Pillora Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index e3cc6ad..baa82db 100644 --- a/README.md +++ b/README.md @@ -9,57 +9,58 @@ dnsmasq in a docker container, configurable via a [simple web UI](https://github 1. Create a [`/opt/dnsmasq.conf`](http://oss.segetech.com/intra/srv/dnsmasq.conf) file on the Docker host - ``` ini - #dnsmasq config, for a complete example, see: - # http://oss.segetech.com/intra/srv/dnsmasq.conf - #log all dns queries - log-queries - #dont use hosts nameservers - no-resolv - #use google as default nameservers - server=8.8.4.4 - server=8.8.8.8 - #serve all .company queries using a specific nameserver - server=/company/10.0.0.1 - #explicitly define host-ip mappings - address=/myhost.company/10.0.0.2 - ``` + ```ini + #dnsmasq config, for a complete example, see: + # http://oss.segetech.com/intra/srv/dnsmasq.conf + #log all dns queries + log-queries + #dont use hosts nameservers + no-resolv + #use cloudflare as default nameservers, prefer 1^4 + server=1.0.0.1 + server=1.1.1.1 + strict-order + #serve all .company queries using a specific nameserver + server=/company/10.0.0.1 + #explicitly define host-ip mappings + address=/myhost.company/10.0.0.2 + ``` 1. Run the container - ``` - $ docker run \ - --name dnsmasq \ - -d \ - -p 53:53/udp \ - -p 5380:8080 \ - -v /opt/dnsmasq.conf:/etc/dnsmasq.conf \ - --log-opt "max-size=100m" \ - -e "HTTP_USER=foo" \ - -e "HTTP_PASS=bar" \ - --restart always \ - jpillora/dnsmasq - ``` + ``` + $ docker run \ + --name dnsmasq \ + -d \ + -p 53:53/udp \ + -p 5380:8080 \ + -v /opt/dnsmasq.conf:/etc/dnsmasq.conf \ + --log-opt "max-size=100m" \ + -e "HTTP_USER=foo" \ + -e "HTTP_PASS=bar" \ + --restart always \ + jpillora/dnsmasq + ``` 1. Visit `http://:5380`, authenticate with `foo/bar` and you should see - screen shot 2017-10-15 at 1 41 21 am + screen shot 2017-10-15 at 1 41 21 am 1. Test it out with - ``` - $ host myhost.company - Using domain server: - Name: - Address: #53 - Aliases: + ``` + $ host myhost.company + Using domain server: + Name: + Address: #53 + Aliases: - myhost.company has address 10.0.0.2 - ``` + myhost.company has address 10.0.0.2 + ``` #### MIT License -Copyright © 2016 Jaime Pillora <dev@jpillora.com> +Copyright © 2018 Jaime Pillora <dev@jpillora.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -80,5 +81,4 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - [dockerhub]: https://hub.docker.com/r/jpillora/dnsmasq/ diff --git a/dnsmasq.conf b/dnsmasq.conf index 7018ddc..d2c0e3c 100644 --- a/dnsmasq.conf +++ b/dnsmasq.conf @@ -4,9 +4,10 @@ log-queries #dont use hosts nameservers no-resolv -#use google as default nameservers -server=8.8.4.4 -server=8.8.8.8 +#use cloudflare as default nameservers, prefer 1^4 +server=1.0.0.1 +server=1.1.1.1 +strict-order #serve all .company queries using a specific nameserver server=/company/10.0.0.1 #explicitly define host-ip mappings