Compare commits
2 Commits
master
...
bind-dns-s
Author | SHA1 | Date | |
---|---|---|---|
b3a8eb89ea | |||
cd4400ffba |
@ -19,7 +19,7 @@ LABEL com.github.containers.toolbox="true" \
|
||||
# Install base development packages
|
||||
RUN dnf copr enable atim/starship -y -q
|
||||
RUN dnf copr enable varlad/zellij -y -q
|
||||
RUN dnf install neovim tmux git fish zsh bat exa starship zellij wget unzip ansible htop iftop fzf -y -q
|
||||
RUN dnf install neovim tmux git fish zsh bat exa starship zellij wget unzip ansible htop iftop -y -q
|
||||
RUN dnf groupinstall "C Development Tools and Libraries" -y -q
|
||||
|
||||
# Install atuin (magical shell history)
|
||||
|
@ -16,5 +16,5 @@ LABEL com.github.containers.toolbox="true" \
|
||||
maintainer="Wyatt J. Miller <wyatt@wyattjmiller.com>"
|
||||
|
||||
# Install .NET and related tools
|
||||
RUN dnf install dotnet-sdk-7.0 dotnet-templates-7.0 -y -q
|
||||
RUN dnf install dotnet-sdk-7.0 dotnet-templates-7.0
|
||||
RUN dotnet tool install --global PowerShell
|
||||
|
@ -16,5 +16,5 @@ LABEL com.github.containers.toolbox="true" \
|
||||
maintainer="Wyatt J. Miller <wyatt@wyattjmiller.com>"
|
||||
|
||||
# Install .NET and related tools
|
||||
RUN dnf install dotnet-sdk-8.0 dotnet-templates-8.0 -y -q
|
||||
RUN dnf install dotnet-sdk-8.0 dotnet-templates-8.0
|
||||
RUN dotnet tool install --global PowerShell
|
||||
|
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
|
||||
|
||||
|
17
specialty-containers/bind/config/db.example.com
Normal file
17
specialty-containers/bind/config/db.example.com
Normal file
@ -0,0 +1,17 @@
|
||||
; TODO: change this to your own soa, ns, a, aaaa, cname, etc. records
|
||||
$TTL 1d ; default expiration time (in seconds) of all RRs without their own TTL value
|
||||
@ IN SOA ns1.example.com. root.example.com. (
|
||||
3 ; Serial
|
||||
1d ; Refresh
|
||||
1h ; Retry
|
||||
1w ; Expire
|
||||
1h ) ; Negative Cache TTL
|
||||
|
||||
; name servers - NS records
|
||||
IN NS ns1.example.com.
|
||||
|
||||
; name servers - A records
|
||||
ns1.example.com. IN A 172.24.0.2
|
||||
|
||||
service1.example.com. IN A 172.24.0.3
|
||||
service2.example.com. IN A 172.24.0.4
|
4
specialty-containers/bind/config/named.conf.local
Normal file
4
specialty-containers/bind/config/named.conf.local
Normal file
@ -0,0 +1,4 @@
|
||||
zone "example.com" {
|
||||
type master;
|
||||
file "/etc/bind/zones/db.example.com";
|
||||
};
|
11
specialty-containers/bind/config/named.conf.options
Normal file
11
specialty-containers/bind/config/named.conf.options
Normal file
@ -0,0 +1,11 @@
|
||||
options {
|
||||
directory "/var/cache/bind";
|
||||
|
||||
recursion yes;
|
||||
listen-on { any; };
|
||||
|
||||
forwarders {
|
||||
8.8.8.8;
|
||||
4.4.4.4;
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user