Modified version of ubuntu/bind9 with varibales option to configure Authoritative DNS Server
103
Modified version of ubuntu/bind9 with variables option to configure Authoritative DNS Server:
Notify and allow-transfer to secondary authoritative Name ServerA records ( for single zone)CNAME records ( for single zone)Same as ubuntu/bind9
Launch this image locally:
docker run -d --name bind9-container -e TZ=UTC -p 30053:53 mmurilo/bind9:9.18-22.04_beta
Access your Bind9 server at localhost:30053
Launch this image locally configuring:
docker run -d \
--name bind9 \
-e TZ=UTC \
-e BIND9_USER=root \
-e TSIG_KEY="123456789abcdfgh" \
-e ZONES_LIST="myzone.com" \
-e FORWARDERS=1.1.1.1,1.0.0.1 \
-e DNS_IP="192.168.0.53" \
-e ACL_CIDRS=192.168.0.0/32,10.0.0.0/16 \
-v /path/to/bind/configuration:/etc/bind
--restart unless-stopped \
mmurilo/bind9:9.18-22.04_beta
| Parameter | Description |
|---|---|
| -e TZ=UTC | Timezone |
| -p 30053:53 | Expose bind9 on localhost:30053 |
| -e BIND9_USER=bind | The user which will start the named process |
| -v /path/to/bind/configuration:/etc/bind/named.conf | Local configuration file named.conf |
| -v /path/to/cached/data:/var/cache/bind | Location where locally cached data can be dumped |
| -v /path/to/resource/records:/var/lib/bind | Location of Resource Records defining various domain information |
| Parameter | Description |
|---|---|
| -e TSIG_KEY="1234567890asdfghj" | TSIG signature Key ( generated by dnssec-keygen ) Only TSIG_KEY or CREATE_TSIG_KEY should be set |
| -e CREATE_TSIG_KEY=true | auto generate a TSIG signature Key. Only TSIG_KEY or CREATE_TSIG_KEY should be set |
| -e TSIG_ALGORITHM="hmac-sha256" | Algorithm used for TSIG key encryption. Defaults to hmac-sha256 |
| -e ZONES_LIST="myzone.com" | Zones to be configured. Coma separated |
| -e DNS_IP="192.168.0.53" | server IP running Bind |
| -e ZONE_TTL="3600" | Zone time to live. Defaults to 3600 |
| -e FORWARDERS=1.1.1.1,1.0.0.1 | List of DNS to forward queries. Defaults to ("1.1.1.2" "1.0.0.2" "8.8.8.8". Coma separated |
| -e ACL_CIDRS=192.168.0.0/32,10.0.0.0/16 | List of CIDRS for ACL for dns queries. Coma separated |
| -e SECONDARY_IP="192.168.0.54" | Configure notify and allow-transfer to indicated Secondary server |
| -e A_some_name=192.168.0.100 | Configure a A record entry in a single zone in ZONES_LIST |
| -e CNAME_some_name=some_host | Configure a CNAME record entry in a single zone in ZONES_LIST. |
| -e RFC_2136=true | Enable if Zone will be dynamic updated RFC 2136. eg: terraform DNS provider. It requires a volume to persist data between container restart |
A and CNAME records for A single zone configured with ZONES_LIST can be created passing variables.
For multiple zones ouse RFC 2136.
each entry will use the following pattern:
variable name: type_name
variable value: origin address ( ip for A and host for CNAME)
example:
ZONES_LIST=test.com
A_test1="192.168.0.101"
A_test2="192.168.0.102"
CNAME_test3="test1.test.com"
this will create the following records:
;; A records
teste1 IN A 192.168.0.101
teste2 IN A 192.168.0.102
;; CNAME records
teste3 IN CNAME teste1.test.com
Contributing to mmurilo/bind9
I would love your input! Feel free to make any contributing to this project, whether it's:
Pull requests are the best way to propose changes. I actively welcome your pull requests:
Fork the repo and create your branch from master. If you've added code that should be tested, add some tests' examples. Issue that pull request!
Content type
Image
Digest
sha256:99ee36820…
Size
48.4 MB
Last updated
almost 3 years ago
docker pull mmurilo/bind9:0.0.1-alpha