Fix for being able to pass override options to bind from the run commandline - as per @lkollenberger's use case

This commit is contained in:
Ventz Petkov 2018-11-19 16:08:35 -05:00
parent 81271eb153
commit f585357323
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
### ISC BIND9 Container (Stable: 9.12.2_xx) built on top of Alpine
### Last update: 10-9-18 (major new update!)
### Last update: 11-19-18
### Latest Stable Docker Tag: 9.12.2_p1
NOTE: "Last Update" is the date of the latest DockerHub build.
@ -76,3 +76,6 @@ docker run --name=dns-resolver
-v /DATA/var/cache/bind:/var/cache/bind \
ventz/bind
```
Additional options may be passed to the bind daemon via the `OPTIONS` argument, provided as:
`docker run --env OPTIONS='...'

View File

@ -1,6 +1,7 @@
#!/bin/sh
OPTIONS=$@
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
exec /usr/sbin/named -c /etc/bind/named.conf -g -u named $OPTIONS