update to 9.18.13

This commit is contained in:
ElevenNotes
2023-04-05 09:48:53 +02:00
parent 47d34d2d59
commit 3855248580
5 changed files with 48 additions and 28 deletions

View File

@@ -1,5 +1,6 @@
# :: Header # :: Header
FROM alpine:3.16 FROM alpine:latest
ENV binVersion=9.18.13-r0
# :: Run # :: Run
USER root USER root
@@ -10,12 +11,15 @@
mkdir -p /bind/etc \ mkdir -p /bind/etc \
mkdir -p /bind/var; mkdir -p /bind/var;
# :: install
RUN set -ex; \ RUN set -ex; \
apk add --update --no-cache \ apk add --update --no-cache \
bash \ bash \
bind>=9.16.29 \ bind>=${binVersion} \
bind-tools \
shadow; shadow;
# :: configure
RUN set -ex; \ RUN set -ex; \
addgroup --gid 1000 -S bind; \ addgroup --gid 1000 -S bind; \
adduser --uid 1000 -D -S -h /bind -s /sbin/nologin -G bind bind; adduser --uid 1000 -D -S -h /bind -s /sbin/nologin -G bind bind;
@@ -29,13 +33,14 @@
/bind \ /bind \
/var/run/named; /var/run/named;
# :: Version
RUN set -ex; \
echo "CI/CD{{$(named -v 2>&1)}}";
# :: Volumes # :: Volumes
VOLUME ["/bind/etc", "/bind/var"] VOLUME ["/bind/etc", "/bind/var"]
# :: Monitor
RUN set -ex; chmod +x /usr/local/bin/healthcheck.sh
HEALTHCHECK CMD /usr/local/bin/healthcheck.sh || exit 1
# :: Start # :: Start
RUN set -ex; chmod +x /usr/local/bin/entrypoint.sh
USER bind USER bind
CMD ["/usr/sbin/named", "-fg", "-c", "/bind/etc/named.conf", "-u", "bind"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

View File

@@ -9,6 +9,8 @@ options {
max-cache-size 256m; max-cache-size 256m;
}; };
server ::/0 { bogus yes; };
acl acl-internal { acl acl-internal {
10.0.0.0/8; 10.0.0.0/8;
172.16.0.0/12; 172.16.0.0/12;

View File

@@ -1,7 +1,9 @@
view "internal" { view "internal" {
recursion yes;
match-clients { acl-internal; }; match-clients { acl-internal; };
allow-query { acl-internal; }; allow-query { acl-internal; };
recursion yes; allow-recursion { acl-internal; };
zone "." { type hint; file "/bind/var/root.db"; };
}; };
view "external" { view "external" {

View File

@@ -0,0 +1,9 @@
#!/bin/ash
if [ -z "${1}" ]; then
set -- "named" \
-fg \
-c "/bind/etc/named.conf" \
-u bind
fi
exec "$@"

View File

@@ -0,0 +1,2 @@
#!/bin/ash
dig . NS @localhost || exit 1