Compare commits
No commits in common. "master" and "9.14.8-r0" have entirely different histories.
24
README.md
24
README.md
@ -1,6 +1,6 @@
|
|||||||
### ISC BIND9 Container (Stable: 9.16.6_xx) built on top of Alpine
|
### ISC BIND9 Container (Stable: 9.14.8_xx) built on top of Alpine
|
||||||
### Last update: 8-31-20
|
### Last update: 2-6-20
|
||||||
### Latest Stable Docker Tag: 9.16.6-r0
|
### Latest Stable Docker Tag: 9.14.8-r0
|
||||||
|
|
||||||
NOTE: "Last Update" is the date of the latest DockerHub build.
|
NOTE: "Last Update" is the date of the latest DockerHub build.
|
||||||
|
|
||||||
@ -154,20 +154,6 @@ logging {
|
|||||||
category default { stdout; };
|
category default { stdout; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
For more information, see: https://www.slideshare.net/MenandMice/bind-9-logging-best-practices
|
For more information, see: https://www.slideshare.net/MenandMice/bind-9-logging-best-practices
|
||||||
|
|
||||||
## How do I just change Bind STDERR to STDOUT logging?
|
|
||||||
|
|
||||||
There is now a "BIND_LOG" ENV (environment) variable for logging
|
|
||||||
|
|
||||||
Environment variables can both have a default and be customized at run time.
|
|
||||||
|
|
||||||
```
|
|
||||||
"-g" = (default) Run the server in the foreground and force all logging stderr.
|
|
||||||
"-f" = Run the server in the foreground
|
|
||||||
```
|
|
||||||
|
|
||||||
By default, the "-g" value is set, as that logs all to STDERR.
|
|
||||||
You can now override it with "-f" by passing `-e "BIND_LOG=-f"` to `docker run`
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,11 +3,6 @@ EXPOSE 53 53/udp
|
|||||||
|
|
||||||
RUN apk --update upgrade && apk add bind bind-tools bind-plugins
|
RUN apk --update upgrade && apk add bind bind-tools bind-plugins
|
||||||
|
|
||||||
# BIND Log Options - you can override at run time
|
|
||||||
# "-g" = (default) Run the server in the foreground and force all logging stderr.
|
|
||||||
# "-f" = Run the server in the foreground
|
|
||||||
env BIND_LOG -g
|
|
||||||
|
|
||||||
# /etc/bind needs to be owned by root, group owned by "bind", and chmod 750
|
# /etc/bind needs to be owned by root, group owned by "bind", and chmod 750
|
||||||
# since we are mounting, do it manually
|
# since we are mounting, do it manually
|
||||||
# NOTE: Per Dockerfile manual --> need to mkdir the mounted dir to chown
|
# NOTE: Per Dockerfile manual --> need to mkdir the mounted dir to chown
|
||||||
@ -17,7 +12,7 @@ env BIND_LOG -g
|
|||||||
# NOTE: Per Dockerfile manual --> need to mkdir the mounted dir to chown
|
# NOTE: Per Dockerfile manual --> need to mkdir the mounted dir to chown
|
||||||
# &
|
# &
|
||||||
# Get latest bind.keys
|
# Get latest bind.keys
|
||||||
RUN mkdir -m 0750 -p /etc/bind && chown -R root:named /etc/bind ; \
|
RUN mkdir -m 0770 -p /etc/bind && chown -R root:named /etc/bind ; \
|
||||||
mkdir -m 0770 -p /var/cache/bind && chown -R named:named /var/cache/bind ; \
|
mkdir -m 0770 -p /var/cache/bind && chown -R named:named /var/cache/bind ; \
|
||||||
wget -q -O /etc/bind/bind.keys https://ftp.isc.org/isc/bind9/keys/9.11/bind.keys.v9_11 ; \
|
wget -q -O /etc/bind/bind.keys https://ftp.isc.org/isc/bind9/keys/9.11/bind.keys.v9_11 ; \
|
||||||
rndc-confgen -a
|
rndc-confgen -a
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
; on server FTP.INTERNIC.NET
|
; on server FTP.INTERNIC.NET
|
||||||
; -OR- RS.INTERNIC.NET
|
; -OR- RS.INTERNIC.NET
|
||||||
;
|
;
|
||||||
; last update: April 29, 2020
|
; last update: January 30, 2018
|
||||||
; related version of root zone: 2020042901
|
; related version of root zone: 2018013001
|
||||||
;
|
;
|
||||||
; FORMERLY NS.INTERNIC.NET
|
; FORMERLY NS.INTERNIC.NET
|
||||||
;
|
;
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
OPTIONS=$@
|
OPTIONS=$@
|
||||||
# "Run Time" changes - needed for when creating a *new* directory/first-time volume map
|
|
||||||
# A great example of this is "/var/cache/bind" for dynamic configs, and mapping it in
|
|
||||||
# The first time around, it will not be owned by named:named, and thus it won't be writable
|
|
||||||
mkdir /tmp/bind
|
|
||||||
chown -R root:named /etc/bind /var/run/named
|
chown -R root:named /etc/bind /var/run/named
|
||||||
chown -R named:named /var/cache/bind /tmp/bind
|
chown -R named:named /var/cache/bind
|
||||||
chmod -R 770 /etc/bind /var/cache/bind /var/run/named
|
chmod -R 770 /var/cache/bind /var/run/named
|
||||||
find /etc/bind /var/cache/bind -type f -exec chmod 640 -- {} +
|
chmod -R 750 /etc/bind
|
||||||
# By default - run in foreground and log to STDERR (console)
|
# Run in foreground and log to STDERR (console):
|
||||||
# can be changed by running container with: -e "BIND_LOG=-f"
|
exec /usr/sbin/named -c /etc/bind/named.conf -g -u named $OPTIONS
|
||||||
cd /tmp/bind
|
|
||||||
exec /usr/sbin/named -c /etc/bind/named.conf $BIND_LOG -u named $OPTIONS
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user