From f585357323e8c28ff227a53b3a597a98d5f16450 Mon Sep 17 00:00:00 2001 From: Ventz Petkov Date: Mon, 19 Nov 2018 16:08:35 -0500 Subject: [PATCH] Fix for being able to pass override options to bind from the run commandline - as per @lkollenberger's use case --- README.md | 5 ++++- container/entrypoint.sh | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a756c63..6ed8d71 100644 --- a/README.md +++ b/README.md @@ -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='...' diff --git a/container/entrypoint.sh b/container/entrypoint.sh index 91cf66e..1342f4e 100755 --- a/container/entrypoint.sh +++ b/container/entrypoint.sh @@ -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