Coder Social home page Coder Social logo

powerdns's Introduction

PowerDNS in Docker with master/slave configuration

This Dockerfile by default will build a PowerDNS image configured to be master.

$ docker build -t pdns_master:latest .
...

In order to build a slave image perform the following:

$ docker build -t pdns_slave:latest --build-arg='role=slave' .
...

After you have built the images, you can run a container by executing:

$ docker run -d pdns_master:latest
3b52bbbdf5f98w7eyh9wefhjw9efhqw9eofjqefo

You may inspect the container and get the IP address to configure the slave and send commands from a different network address.

$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' 3b52bbbdf5f9
172.17.0.2

You may now enter the running master and create a zone and enter records as well as allowing AXFR to slave nodes:

$ docker exec -it 3b52bbbdf5f9 /bin/bash
$ pdnsutil create-zone cookgetsitdone.co.uk
$ pdnsutil add-record cookgetsitdone.co.uk www1 A 10.100.100.21
$ pdnsutil set-kind cookgetsitdone.co.uk master
$ pdnsutil set-meta cookgetsitdone.co.uk ALLOW-AXFR-FROM 172.17.0.0/16

Finally, you can create a slave instance and configure it to request AXFR from the master.

$ docker run -d pdns_slave:latest
...
$ docker exec -it ... /bin/bash
$ pdnsutil create-slave-zone cookgetsitdone.co.uk 172.17.0.2:5353

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.