add a Dockerfile

This commit is contained in:
Rene Moser 2017-01-16 12:10:08 +01:00
parent a58e654d5e
commit 9a33af0410
3 changed files with 35 additions and 1 deletions

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM bitnami/minideb:jessie
RUN install_packages python pdns-server pdns-backend-pipe
ADD src/backend.conf.example /usr/local/bin/backend.conf
ADD src/nip.py /usr/local/bin/nip
ADD docker/pdns.conf /etc/pdns/pdns.conf
EXPOSE 53/udp 53/tcp
CMD ["pdns_server", "--master", "--daemon=no", "--local-address=0.0.0.0", "--config-dir=/etc/pdns/"]

View File

@ -20,7 +20,31 @@ NIP.IO maps <anything>.<IP Address with dashes>.nip.io to the corresponding <IP
## INSTALL
TPD
### As docker container
Build the image:
~~~
docker build -t nip.io .
~~~
Run the container:
~~~
docker run -d -p 0.0.0.0:53:53/tcp -p 0.0.0.0:53:53/udp --name nip.io nip.io
~~~
See the logs:
~~~
docker logs -f nip.io
~~~
Test it:
~~~
dig 1-2-3-4.example.com +short @localhost
1.2.3.4
dig foo.1-2-3-4.example.com +short @localhost
1.2.3.4
~~~
## LICENSE

2
docker/pdns.conf Normal file
View File

@ -0,0 +1,2 @@
launch=pipe
pipe-command=/usr/local/bin/nip