Sign inSign up

homecentr/dns

By homecentr

Updated about 6 years ago

Image
0

2.7K

homecentr/dns repository overview

Project status

CI/CD on master Regular Docker image vulnerability scan

HomeCenter - DNS

BIND9 DNS server packed with the usual bells and whistles.

Usage

Make sure you set container's DNS to localhost (127.0.0.1). The container has a built-in health check which tries to resolve a dummy DNS record. If you do not override the DNS, the health check command will be asking the DNS server the host is using instead of the DNS server running inside of this container and will obviously fail.

version: "3.7"
services:
  dns:
    build: .
    dns:
      - 127.0.0.1 # important for health check
    restart: unless-stopped
    volumes:
      # the directory MUST be writable, BIND9 writes jnl files next to the configuration
      - "./example:/config:rw"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "9000:9000/tcp"

Configuration

See the example/named.conf for a quickstart or BIND9 documentation for full configuration reference. The root configuration file (named.conf) is expected to be at /config/named.conf. The container contains a piece of built-in configuration which automatically sets up the statistics endpoint and a zone for health check.

Environment variables

NameDefault valueDescription
PUID7077UID of the user cadvisor should be running as. The UID must have sufficient rights to read from the Docker socket.
PGID7077GID of the user cadvisor should be running as. You must set the PUID if you want to set the PGID variable.

Exposed ports

PortDescription
53/tcpDNS protocol over TCP
53/udpDNS protocol over UDP
8888/tcpDefault port for statistics, is not opened by default, must be configured in named.conf

Volumes

Container pathDescription
/configBIND9 configuration files. This location must be writable by the PUID/PGID user because BIND9 writes journal files next to the zone files.

Security

The container is regularly scanned for vulnerabilities and updated. Further info can be found in the Security tab.

Container user

The container supports privilege drop. Even though the container starts as root, it will use the permissions only to perform the initial set up. The cadvisor process runs as UID/GID provided in the PUID and PGID environment variables.

:warning: Do not change the container user directly using the user Docker compose property or using the --user argument. This would break the privilege drop logic.

Tag summary

Content type

Image

Digest

Size

21.3 MB

Last updated

about 6 years ago

docker pull homecentr/dns