knet-nameserver/docker-compose.yml
2025-12-26 01:17:33 +01:00

28 lines
No EOL
1.1 KiB
YAML

services:
dns_server:
hostname: dns.karmacoma.dev
image: technitium/dns-server:14.3.0
# For DHCP deployments, use "host" network mode and remove all the port mappings, including the ports array by commenting them
# network_mode: "host"
ports:
- "53:53/udp" #DNS service
- "53:53/tcp" #DNS service
environment:
- DNS_SERVER_DOMAIN=dns.karmacoma.dev #The primary domain name used by this DNS Server to identify itself.
# - DNS_SERVER_FORWARDERS=1.1.1.1, 8.8.8.8 #Comma separated list of forwarder addresses.
# - DNS_SERVER_FORWARDER_PROTOCOL=Tcp #Forwarder protocol options: Udp, Tcp, Tls, Https, HttpsJson.
# - DNS_SERVER_LOG_USING_LOCAL_TIME=true #Enable this option to use local time instead of UTC for logging.
volumes:
- config:/etc/dns
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "dig +short @127.0.0.1 dns.karmacoma.dev || exit 1"]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
sysctls:
- net.ipv4.ip_local_port_range=1024 65000
volumes:
config: