initial bind dns server containerfile, sample files
This commit is contained in:
parent
eaefe9d8c3
commit
cd4400ffba
38
specialty-containers/bind/Containerfile
Normal file
38
specialty-containers/bind/Containerfile
Normal file
@ -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 <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"]
|
56
specialty-containers/bind/README.md
Normal file
56
specialty-containers/bind/README.md
Normal file
@ -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
|
||||||
|
|
||||||
|
|
0
specialty-containers/bind/config/db.example.com
Normal file
0
specialty-containers/bind/config/db.example.com
Normal file
0
specialty-containers/bind/config/named.conf.local
Normal file
0
specialty-containers/bind/config/named.conf.local
Normal file
0
specialty-containers/bind/config/named.conf.options
Normal file
0
specialty-containers/bind/config/named.conf.options
Normal file
Loading…
Reference in New Issue
Block a user