mirror of
https://github.com/11notes/docker-bind.git
synced 2025-11-18 12:12:56 +00:00
added better rootdb handling
This commit is contained in:
@@ -13,7 +13,7 @@ docker run --name bind \
|
|||||||
-d 11notes/bind:[tag]
|
-d 11notes/bind:[tag]
|
||||||
```
|
```
|
||||||
|
|
||||||
Update root db (will also update at container start)
|
Update root db (will update on start if does not exist)
|
||||||
```shell
|
```shell
|
||||||
docker exec bind rootdb
|
docker exec bind rootdb
|
||||||
```
|
```
|
||||||
@@ -35,4 +35,3 @@ docker exec bind rootdb
|
|||||||
|
|
||||||
## Tips
|
## Tips
|
||||||
* Don't bind to ports < 1024 (requires root), use NAT/reverse proxy
|
* Don't bind to ports < 1024 (requires root), use NAT/reverse proxy
|
||||||
* [Permanent Storage](https://github.com/11notes/alpine-docker-netshare) - Module to store permanent container data via NFS/CIFS and more
|
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
#!/bin/ash
|
#!/bin/ash
|
||||||
if [ -z "${1}" ]; then
|
if [ -z "${1}" ]; then
|
||||||
|
|
||||||
|
if [ ! -f "/bind/var/root.db" ]; then
|
||||||
|
rootdb
|
||||||
|
fi
|
||||||
|
|
||||||
set -- "named" \
|
set -- "named" \
|
||||||
-fg \
|
-fg \
|
||||||
-c "/bind/etc/named.conf" \
|
-c "/bind/etc/named.conf" \
|
||||||
|
|||||||
@@ -1,2 +1,8 @@
|
|||||||
#!/bin/ash
|
#!/bin/ash
|
||||||
dig +bufsize=1200 +norec NS . @a.root-servers.net | egrep -v ';|^$' | egrep -v '\S.+AAAA.+|^$' | sort > /bind/var/root.db
|
if [ ! -f "/bind/var/root.db" ]; then
|
||||||
|
ROOT_DB_NS=198.41.0.4
|
||||||
|
else
|
||||||
|
ROOT_DB_NS=a.root-servers.net
|
||||||
|
fi
|
||||||
|
|
||||||
|
dig +bufsize=1200 +norec NS . @${ROOT_DB_NS} | egrep -v ';|^$' | egrep -v '\S.+AAAA.+|^$' | sort > /bind/var/root.db
|
||||||
Reference in New Issue
Block a user