-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump to webproc 0.2.2 and dnsmasq 2.80
- Loading branch information
Showing
5 changed files
with
46 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM alpine:edge | ||
LABEL maintainer="[email protected]" | ||
# 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! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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://<docker-host>:5380`, authenticate with `foo/bar` and you should see | ||
|
||
<img width="833" alt="screen shot 2017-10-15 at 1 41 21 am" src="https://user-images.githubusercontent.com/633843/31580966-baacba62-b1a9-11e7-8439-ca1ddfe828dd.png"> | ||
<img width="833" alt="screen shot 2017-10-15 at 1 41 21 am" src="https://user-images.githubusercontent.com/633843/31580966-baacba62-b1a9-11e7-8439-ca1ddfe828dd.png"> | ||
|
||
1. Test it out with | ||
|
||
``` | ||
$ host myhost.company <docker-host> | ||
Using domain server: | ||
Name: <docker-host> | ||
Address: <docker-host>#53 | ||
Aliases: | ||
``` | ||
$ host myhost.company <docker-host> | ||
Using domain server: | ||
Name: <docker-host> | ||
Address: <docker-host>#53 | ||
Aliases: | ||
myhost.company has address 10.0.0.2 | ||
``` | ||
myhost.company has address 10.0.0.2 | ||
``` | ||
|
||
#### MIT License | ||
|
||
Copyright © 2016 Jaime Pillora <[email protected]> | ||
Copyright © 2018 Jaime Pillora <[email protected]> | ||
|
||
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters