From 569fc2528c4eeb8e61482ff89b8224b5109489c6 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 19 Mar 2024 17:35:31 +0930 Subject: [PATCH] feat(bind): run command to specify ipv4, config file and log file !17 --- dockerfile | 7 ++++++- includes/etc/bind/conf.d/options.conf | 4 +--- includes/etc/supervisor/conf.d/named.conf | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dockerfile b/dockerfile index a8c1059..ab12ed1 100644 --- a/dockerfile +++ b/dockerfile @@ -11,7 +11,11 @@ RUN \ apk upgrade --no-cache; \ apk add --no-cache \ bind==${VERSION_BIND} \ - supervisor; + supervisor; \ + rm -f \ + /etc/bind/named.conf.authoritative \ + /etc/bind/named.conf.recursive \ + /etc/bind/rndc.key; EXPOSE \ @@ -33,3 +37,4 @@ RUN \ CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] +# CMD ["named", "-c", "/etc/bind/named.conf", "-g", "-u", "named"] diff --git a/includes/etc/bind/conf.d/options.conf b/includes/etc/bind/conf.d/options.conf index 7093b74..1db9c67 100644 --- a/includes/etc/bind/conf.d/options.conf +++ b/includes/etc/bind/conf.d/options.conf @@ -6,9 +6,7 @@ options { listen-on { 127.0.0.1; }; listen-on-v6 { none; }; - allow-transfer { - none; - }; + allow-transfer { none; }; pid-file "/var/run/named/named.pid"; diff --git a/includes/etc/supervisor/conf.d/named.conf b/includes/etc/supervisor/conf.d/named.conf index ab002f1..526dd35 100644 --- a/includes/etc/supervisor/conf.d/named.conf +++ b/includes/etc/supervisor/conf.d/named.conf @@ -1,7 +1,7 @@ [program:bind] startsecs=0 stopwaitsecs=55 -command=/usr/sbin/named -f +command=/usr/sbin/named -4 -f -c /etc/bind/named.conf -L /var/log/named.log autorestart=true autostart=true stdout_logfile=/var/log/supervisor_%(program_name)s.log