Skip to content

Commit

Permalink
fixed dnsmasq
Browse files Browse the repository at this point in the history
  • Loading branch information
sroegner committed Oct 1, 2014
1 parent 8b82ee1 commit 32c900a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 35 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
dnsmasq.hosts
watchmen/watchmen-config/hosts.js
saltfiles
*.container.id
Expand Down
19 changes: 11 additions & 8 deletions dnsmasq/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
FROM ubuntu
FROM sroegner/centos-base-ssh:6
MAINTAINER Steffen Roegner 'steffen.roegner@gmail.com'

VOLUME [ "/dnsmasq.hosts" ]

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes dnsmasq-base dnsutils
ADD dnsmasq.conf /etc/dnsmasq.conf
ADD resolv.dnsmasq.conf /etc/resolv.dnsmasq.conf
RUN yum -y install dnsmasq

EXPOSE 5353/udp
COPY dnsmasq.conf /etc/
COPY resolv.dnsmasq.conf /etc/

VOLUME /dnsmasq.hosts

EXPOSE 5353

ENTRYPOINT ["/usr/sbin/dnsmasq", "-d"]

CMD ["/usr/sbin/dnsmasq", "-d"]
#ENTRYPOINT ["/usr/sbin/dnsmasq"]
21 changes: 6 additions & 15 deletions dnsmasq/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
all:
echo "Can do 'clean', 'image' or 'container'"
clean:
sudo docker stop dnsmasq
sudo docker rm dnsmasq

image:
sudo docker build -rm -t='sroegner/dnsmasq' .
hostname := dnsmasq
thirdoctet := 24
include ../shared/Makefile.vars
include ../shared/Makefile

container:
sudo docker run \
-v="$$(pwd)/dnsmasq.hosts:/dnsmasq.hosts" \
-name=dnsmasq \
-p='127.0.0.10:53:5353/udp' \
-d sroegner/dnsmasq
sudo docker ps
sudo docker logs $$(sudo docker ps -l -q)
$(DOCKER_CMD) run -d -v=$(CURDIR)/dnsmasq.hosts:/dnsmasq.hosts --name=$(container_name) --publish=$(IP):5353:5353 $(tag)

9 changes: 2 additions & 7 deletions dnsmasq/dnsmasq.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
port=5353
bind-interfaces
#listen-address=172.17.0.2
resolv-file=/etc/resolv.dnsmasq.conf
#conf-dir=/etc/dnsmasq.d
#domain-needed
#local=/sqrrl-docker.net/
#no-hosts
addn-hosts=/dnsmasq.hosts/
addn-hosts=/dnsmasq.hosts
expand-hosts
domain=sqrrl-lab.net
domain=testdomain.local
log-queries

1 change: 1 addition & 0 deletions dnsmasq/dnsmasq.hosts/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# place hosts files in this directory and dnsmasq will pick them up at startup (no automatic re-load)
5 changes: 1 addition & 4 deletions zookeeper/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
hostname := centos-base
thirdoctet := 20
thirdoctet := 28
include ../shared/Makefile.vars
tag := "$(reg)/$(box_name):6"
include ../shared/Makefile

image:
Expand All @@ -11,6 +10,4 @@ image:

container:
$(DOCKER_CMD) run -d --name=$(container_name) --publish=$(IP):2181:2181 $(tag)
$(DOCKER_CMD) ps


0 comments on commit 32c900a

Please sign in to comment.