Cleanup of directory for zones back to /var/cache/bind. Also stable release tag
This commit is contained in:
parent
1695a7a4d6
commit
22307fab9c
13
README.md
13
README.md
|
@ -1,5 +1,6 @@
|
|||
### ISC BIND9 Container (Stable: 9.11.2_xx) built on top of Alpine
|
||||
### Last update: 2-12-18 (major new update!)
|
||||
### Last update: 2-28-18 (major new update!)
|
||||
### Latest Stable Docker Tag: 9.11.2_p1-r0
|
||||
|
||||
NOTE: "Last Update" is the date of the latest DockerHub build.
|
||||
|
||||
|
@ -21,7 +22,7 @@ This container contains everything needed in terms of configuration to
|
|||
run as an authoritative server or a recursive resolver/forwarding cacher.
|
||||
|
||||
However, the default config permits queries and recursion only from 127.0.0.1 - which will not be too useful :)
|
||||
But the assumption is that you will override ```/etc/bind``` with your configs, and ```/var/bind``` with your zones.
|
||||
But the assumption is that you will override ```/etc/bind``` with your configs, and ```/var/cache/bind``` with your zones.
|
||||
|
||||
# Required "DATA" directory - for configs and zone data:
|
||||
This container assumes you have a "/DATA" folder with with your container specific data.
|
||||
|
@ -34,7 +35,7 @@ In your "/DATA/etc/bind" directory, a file "named.conf", which acts as an entry
|
|||
Take a look at the default config, and the example configs provided
|
||||
|
||||
2.) [ *REQUIRED* ]
|
||||
A "/DATA/var/bind" directory for all of the master or slave zones. If it's for slave zones, it will populate automatically and you can leave it blank.
|
||||
A "/DATA/var/cache/bind" directory for all of the master or slave zones. If it's for slave zones, it will populate automatically and you can leave it blank.
|
||||
```
|
||||
|
||||
|
||||
|
@ -53,14 +54,14 @@ ventz/bind
|
|||
|
||||
## Customer Override Example for Authoritative Master
|
||||
Edit: named.conf.local with your forward zone at least
|
||||
and create the file in /var/named/$yourdomain.tld
|
||||
and create the file in /var/cache/bind/$yourdomain.tld
|
||||
```
|
||||
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/bind:/var/bind \
|
||||
-v /DATA/var/cache/bind:/var/cache/bind \
|
||||
ventz/bind
|
||||
```
|
||||
|
||||
|
@ -72,6 +73,6 @@ docker run --name=dns-resolver
|
|||
--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/bind:/var/bind \
|
||||
-v /DATA/var/cache/bind:/var/cache/bind \
|
||||
ventz/bind
|
||||
```
|
||||
|
|
|
@ -13,7 +13,7 @@ RUN apk --update upgrade && apk add bind
|
|||
# &
|
||||
# Get latest bind.keys
|
||||
RUN mkdir -m 0770 -p /etc/bind && chown -R root:named /etc/bind ; \
|
||||
mkdir -m 0770 -p /var/bind && chown -R root:named /var/cache ; \
|
||||
mkdir -m 0770 -p /var/cache/bind && chown -R root:named /var/cache/bind ; \
|
||||
wget -q -O /etc/bind/bind.keys https://ftp.isc.org/isc/bind9/keys/9.11/bind.keys.v9_11 ; \
|
||||
rndc-confgen -a -r /dev/urandom
|
||||
|
||||
|
@ -24,7 +24,7 @@ COPY configs/. /etc/bind/
|
|||
# "if any build steps change the data within the volume
|
||||
# after it has been declared, those changes will be discarded."
|
||||
VOLUME ["/etc/bind"]
|
||||
VOLUME ["/var/bind"]
|
||||
VOLUME ["/var/cache/bind"]
|
||||
|
||||
COPY entrypoint.sh /
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
|
@ -22,7 +22,7 @@ include "/etc/bind/named.conf.rfc1918";
|
|||
# example reverse zone: 1.2.3.4/24
|
||||
//zone "4.3.2.1.in-addr.arpa" {
|
||||
// type master;
|
||||
// file "/var/bind/1.2.3.4.rev";
|
||||
// file "/var/cache/bind/1.2.3.4.rev";
|
||||
// notify yes;
|
||||
//};
|
||||
|
||||
|
@ -33,7 +33,7 @@ include "/etc/bind/named.conf.rfc1918";
|
|||
# example "forward" (domain) zone: domain.tld
|
||||
//zone "domain.tld" {
|
||||
// type master;
|
||||
// file "/var/bind/domain.tld";
|
||||
// file "/var/cache/bind/domain.tld";
|
||||
// notify yes;
|
||||
// #also-notify { a.b.c.d; };
|
||||
// #allow-transfer { localhost; a.b.c.d; };
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
options {
|
||||
directory "/var/bind";
|
||||
directory "/var/cache/bind";
|
||||
|
||||
// Remove (hide) our bind version - no reason to disclose it
|
||||
version "";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
chown -R root:named /etc/bind /var/bind /var/run/named
|
||||
chmod -R 770 /var/bind /var/run/named
|
||||
chown -R root:named /etc/bind /var/cache/bind /var/run/named
|
||||
chmod -R 770 /var/cache/bind /var/run/named
|
||||
chmod -R 750 /etc/bind
|
||||
# Run in foreground and log to STDERR (console):
|
||||
exec /usr/sbin/named -c /etc/bind/named.conf -g -u named
|
||||
|
|
Loading…
Reference in New Issue