Skip to content

Commit 9061654

Browse files
committed
feat(docker): use official isc/bind as base image
ref: #33 closes #36
1 parent 3490167 commit 9061654

File tree

4 files changed

+100
-38
lines changed

4 files changed

+100
-38
lines changed

dockerfile

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11

2-
ARG VERSION_BIND="9.20.17-r0"
3-
ARG VERSION_ALPINE="3.23.2"
2+
ARG VERSION_BIND="9.21"
43

5-
FROM alpine:${VERSION_ALPINE}
64

7-
8-
ARG VERSION_BIND
9-
10-
11-
RUN \
12-
apk upgrade --no-cache; \
13-
apk add --no-cache \
14-
bind==${VERSION_BIND} \
15-
supervisor; \
16-
rm -f \
17-
/etc/bind/named.conf.authoritative \
18-
/etc/bind/named.conf.recursive \
19-
/etc/bind/rndc.key \
20-
/var/bind/pri/127.zone \
21-
/var/bind/pri/localhost.zone;
5+
FROM internetsystemsconsortium/bind9:${VERSION_BIND}
226

237

248
EXPOSE \
@@ -27,30 +11,16 @@ EXPOSE \
2711
# Others required? dnssec, secure updates, sone transfers DOT etc
2812

2913

30-
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD \
31-
supervisorctl status || exit 1
32-
33-
3414
COPY includes/ /
3515

3616

3717
RUN \
38-
chown named:named -R /etc/bind; \
18+
chown bind:bind -R /etc/bind; \
3919
chmod 5771 /etc/bind;
4020

4121

42-
VOLUME includes/etc/bind/conf.d/external
22+
VOLUME /etc/bind
4323

44-
VOLUME includes/etc/bind/conf.d/internal
45-
46-
VOLUME /var/bind/dyn
47-
48-
VOLUME /var/bind/pri
49-
50-
VOLUME /var/bind/sec
24+
VOLUME /var/bind
5125

5226
VOLUME /var/log
53-
54-
55-
CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ]
56-
# CMD ["named", "-c", "/etc/bind/named.conf", "-g", "-u", "named"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
zone "." IN {
22
type hint;
3-
file "named.ca";
3+
file "pri/internal/root-hints.zone";
44
};

includes/etc/bind/conf.d/options.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ options {
44

55
version "unknown";
66

7-
listen-on { 127.0.0.1; };
8-
listen-on-v6 { none; };
7+
listen-on { any; };
8+
listen-on-v6 { any; };
99

1010
allow-transfer { none; };
1111

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
; This file holds the information on root name servers needed to
2+
; initialize cache of Internet domain name servers
3+
; (e.g. reference this file in the "cache . <file>"
4+
; configuration file of BIND domain name servers).
5+
;
6+
; This file is made available by InterNIC
7+
; under anonymous FTP as
8+
; file /domain/named.cache
9+
; on server FTP.INTERNIC.NET
10+
; -OR- RS.INTERNIC.NET
11+
;
12+
; last update: February 15, 2024
13+
; related version of root zone: 2024021501
14+
;
15+
; FORMERLY NS.INTERNIC.NET
16+
;
17+
. 3600000 NS A.ROOT-SERVERS.NET.
18+
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
19+
A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
20+
;
21+
; FORMERLY NS1.ISI.EDU
22+
;
23+
. 3600000 NS B.ROOT-SERVERS.NET.
24+
B.ROOT-SERVERS.NET. 3600000 A 170.247.170.2
25+
B.ROOT-SERVERS.NET. 3600000 AAAA 2801:1b8:10::b
26+
;
27+
; FORMERLY C.PSI.NET
28+
;
29+
. 3600000 NS C.ROOT-SERVERS.NET.
30+
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
31+
C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c
32+
;
33+
; FORMERLY TERP.UMD.EDU
34+
;
35+
. 3600000 NS D.ROOT-SERVERS.NET.
36+
D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
37+
D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d
38+
;
39+
; FORMERLY NS.NASA.GOV
40+
;
41+
. 3600000 NS E.ROOT-SERVERS.NET.
42+
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
43+
E.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:a8::e
44+
;
45+
; FORMERLY NS.ISC.ORG
46+
;
47+
. 3600000 NS F.ROOT-SERVERS.NET.
48+
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
49+
F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
50+
;
51+
; FORMERLY NS.NIC.DDN.MIL
52+
;
53+
. 3600000 NS G.ROOT-SERVERS.NET.
54+
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
55+
G.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:12::d0d
56+
;
57+
; FORMERLY AOS.ARL.ARMY.MIL
58+
;
59+
. 3600000 NS H.ROOT-SERVERS.NET.
60+
H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53
61+
H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53
62+
;
63+
; FORMERLY NIC.NORDU.NET
64+
;
65+
. 3600000 NS I.ROOT-SERVERS.NET.
66+
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
67+
I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53
68+
;
69+
; OPERATED BY VERISIGN, INC.
70+
;
71+
. 3600000 NS J.ROOT-SERVERS.NET.
72+
J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
73+
J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30
74+
;
75+
; OPERATED BY RIPE NCC
76+
;
77+
. 3600000 NS K.ROOT-SERVERS.NET.
78+
K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
79+
K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
80+
;
81+
; OPERATED BY ICANN
82+
;
83+
. 3600000 NS L.ROOT-SERVERS.NET.
84+
L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
85+
L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:9f::42
86+
;
87+
; OPERATED BY WIDE
88+
;
89+
. 3600000 NS M.ROOT-SERVERS.NET.
90+
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
91+
M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
92+
; End of file

0 commit comments

Comments
 (0)