39 lines
1.1 KiB
Docker
39 lines
1.1 KiB
Docker
# Custom BIND DNS server image
|
|
# Written by Wyatt J. Miller, 2024
|
|
# This image is opinionated, but you're welcome to customize as much as you like
|
|
FROM internetsystemsconsortium/bind9:9.18
|
|
|
|
# Label it right, ya know?
|
|
ENV NAME=custom_bind_dns_server_image VERSION=1.0
|
|
LABEL com.github.containers.toolbox="true" \
|
|
com.redhat.component="$NAME" \
|
|
name="$NAME" \
|
|
version="$VERSION" \
|
|
usage="BIND DNS server image" \
|
|
summary="Wyatt's custom BIND DNS server image" \
|
|
maintainer="Wyatt J. Miller <wyatt@wyattjmiller.com>" \
|
|
vendor="Miller Web Solutions"
|
|
|
|
# Install packages
|
|
RUN apt update \
|
|
&& apt install -y \
|
|
bind9-doc \
|
|
dnsutils \
|
|
geoip-bin \
|
|
mariadb-server \
|
|
net-tools
|
|
|
|
# Copy configuration files
|
|
# TODO: To the user: CHANGE THESE
|
|
COPY configuration/named.conf.options /etc/bind/
|
|
COPY configuration/named.conf.local /etc/bind/
|
|
COPY configuration/db.example.com /etc/bind/zones/
|
|
|
|
# Expose Ports
|
|
EXPOSE 53/tcp
|
|
EXPOSE 53/udp
|
|
EXPOSE 953/tcp
|
|
|
|
# Start the DNS service
|
|
CMD ["/usr/sbin/named", "-g", "-c", "/etc/bind/named.conf", "-u", "bind"]
|