Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
add a Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Rene Moser committed Jan 16, 2017
1 parent a58e654 commit 9a33af0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions docker/pdns.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
launch=pipe
pipe-command=/usr/local/bin/nip

0 comments on commit 9a33af0

Please sign in to comment.