add a Dockerfile
This commit is contained in:
parent
a58e654d5e
commit
9a33af0410
8
Dockerfile
Normal file
8
Dockerfile
Normal 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/"]
|
26
README.md
26
README.md
@ -20,7 +20,31 @@ NIP.IO maps <anything>.<IP Address with dashes>.nip.io to the corresponding <IP
|
|||||||
|
|
||||||
## INSTALL
|
## 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
|
## LICENSE
|
||||||
|
|
||||||
|
2
docker/pdns.conf
Normal file
2
docker/pdns.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
launch=pipe
|
||||||
|
pipe-command=/usr/local/bin/nip
|
Loading…
Reference in New Issue
Block a user