first version

This commit is contained in:
11notes
2018-01-30 22:17:11 +01:00
parent f00057ba4d
commit a61506dbe8
2 changed files with 46 additions and 0 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
# ------ Header ------ #
FROM alpine:latest
# // add bind
RUN apk update \
&& apk add --update bash \
&& apk add --no-cache bind
# // create directory for zone configuration files
RUN mkdir -p /var/zones \
# // delete default files
&& rm -R /etc/bind/*
# // add default bind config for internal, external view + recursion
ADD ./named.conf /etc/bind/named.conf
# ------ define volumes ------ #
VOLUME ["/etc/bind", "/var/zones"]
# ------ entrypoint for container ------ #
CMD ["/usr/sbin/named", "-fg", "-c", "/etc/bind/named.conf"]

25
named.conf Normal file
View File

@@ -0,0 +1,25 @@
options {
listen-on { any; };
directory "/etc/bind";
recursion no;
allow-notify { none; };
forwarders { 8.8.8.8; 8.8.4.4; };
version "0.0";
};
acl acl-internal {
10.0.0.0/8;
172.16.0.0/12;
192.168.0.0/16;
};
view "internal" {
match-clients { acl-internal; };
allow-query { acl-internal; };
recursion yes;
};
view "external" {
match-clients { any; };
recursion no;
};