diff --git a/specialty-containers/bind/Containerfile b/specialty-containers/bind/Containerfile new file mode 100644 index 0000000..3bfc74c --- /dev/null +++ b/specialty-containers/bind/Containerfile @@ -0,0 +1,38 @@ +# 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 " \ + 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"] diff --git a/specialty-containers/bind/README.md b/specialty-containers/bind/README.md new file mode 100644 index 0000000..e406534 --- /dev/null +++ b/specialty-containers/bind/README.md @@ -0,0 +1,56 @@ +# Custom BIND DNS server + +TODO WORK IN PROGRESS + +Written by Wyatt J. Miller, 2024 + +## Table of Contents + +1. Prerequisites +2. Pulling +3. Installing +4. Running + +## Prerequisites + +- `systemd` (typically already installed) +- OCI container runtime + - Podman is preferred +- `podlet` + +## Pulling + +> [!NOTE] +> This container is to be run as a service and will be treated as such. This +> README will show you how to set this up as a service through `systemd` but +> other avenues are more than welcome + +Pull this container from the command below: + + +```bash +podman pull scm.wyattjmiller.com/wymiller/bind-dns-server:latest +``` + +or you can build this Containerfile yourself! + + +```bash +git clone http://scm.wyattjmiller.com/wymiller/custom-containers.git +cd custom-containers/ +podman build -t bind-dns-server -f specilaty-containers/bind/Containerfile +``` + +There are dedicated configuration files that are copied from the file system to +the container so it is recommended to build this container instead of pulling +it. Pulling the container only allows you to run only a sample DNS server. + +> [!IMPORTANT] +> If you pull this image yourself and don't build the image from scratch, your +> image name will different! Remember this name in future steps. + +Note to Wyatt: Pull your own DNS configuration from git + +## Installing + + diff --git a/specialty-containers/bind/config/db.example.com b/specialty-containers/bind/config/db.example.com new file mode 100644 index 0000000..e69de29 diff --git a/specialty-containers/bind/config/named.conf.local b/specialty-containers/bind/config/named.conf.local new file mode 100644 index 0000000..e69de29 diff --git a/specialty-containers/bind/config/named.conf.options b/specialty-containers/bind/config/named.conf.options new file mode 100644 index 0000000..e69de29