Closed Nurlan199206 closed 6 years ago
@Nurlan199206 It looks like you are overriding the default named.conf with /DATA/etc/bind, but you don't have a "named.conf" in that directory.
,24-Jun-2018 12:01:07.460 loading configuration from '/etc/bind/named.conf' ,24-Jun-2018 12:01:07.462 open: /etc/bind/named.conf: file not found
You can either run it as "as provided" (with defaults - which for an authoritative server is not very useful), or you would need a complete working bind config directory
I have provided an example of the bind file for an authoritative server here:
https://github.com/ventz/docker-bind/blob/master/container/configs/example-configs/authoritative/named.conf.options
Note that you will still need to add your bind zones if you want to run as an authoritative server.
i dont had filenamed.conf
on host machine in /etc/bind/, i am created it, but still getting error these errirs...
28-Jun-2018 11:09:25.391 loading configuration from '/etc/bind/named.conf'
28-Jun-2018 11:09:25.392 open: /etc/bind/named.conf: file not found
28-Jun-2018 11:09:25.393 loading configuration: file not found
28-Jun-2018 11:09:25.393 exiting (due to fatal error)
@Nurlan199206 You want that file on your host system in your bind mount point.
So in the case of:
docker run --name=dns-master -it -d --dns=8.8.8.8 --dns=8.8.4.4 -p 53:53/udp -p 53:53 -v /DATA/etc/bind:/etc/bind -v /DATA/var/cache/bind:/var/cache/bind ventz/bind
Your bind mount point is: /DATA/etc/bind
which then in turn becomes /etc/bind
within the container.
You should take a look at this if you are not familiar with bind-mounts: https://docs.docker.com/storage/bind-mounts/
@ventz i finally did run container.
created example zone, it's not resolving, i did rndc reload
/ # named-checkzone nurlan.kz /etc/bind/default-zones/db.local
zone nurlan.kz/IN: loaded serial 2
OK
/etc/bind/default-zones # cat db.local ; ; BIND data file for local loopback interface ;
$TTL 600
@ IN SOA localhost. root.localhost. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS nurlan.kz.
@ IN A 172.27.1.54
@ IN AAAA ::1
nslookup nurlan.kz 127.0.0.1
Server: 127.0.0.1
Address 1: 127.0.0.1 localhost
nslookup: can't resolve 'nurlan.kz': Try again
your cointainer image suitable for production environment? example for hosting 10 domains?
@Nurlan199206 We are hosting a few hundred in production and I have heard back from people hosting over 5,000 using this container image. You are only limited by the hardware resources (cpu, ram, etc), and with swarm + a shared/distributed storage backend, there's no limit to how many you can host.
For your zone - I would suggest defining it as it's own zone instead of taking over the db.local. The problem is that the db.local is defined as zone "localhost":
zone "localhost" {
type master;
file "/etc/bind/default-zones/db.local";
};
You really want your TLD define as a localhost zone. https://github.com/ventz/docker-bind/blob/master/container/configs/named.conf.local
Alternatively, if you just want to test, on your nslookup (I would suggest dig by the way) you would lookup an A record on your localhost zone.
That said - now we are getting into the actual BIND side (vs this container), and those are better questions for the ISC Bind community: https://github.com/isc-projects/bind9
Closing this issue.
i am getting error
exit code 1
i am running with command:docker run --name=dns-master -it -d --dns=8.8.8.8 --dns=8.8.4.4 -p 53:53/udp -p 53:53 -v /DATA/etc/bind:/etc/bind -v /DATA/var/cache/bind:/var/cache/bind ventz/bind
logs are below.