/data volume. Docker lets containers
use ports below 1024 without root.
Save this as docker-compose.yml:
docker-compose.yml
http://<server>:8080 and finish the setup page.
Settings
Settings go in theenvironment block. The ones you’ll usually want:
Every setting is listed in Configuration. The image already sets
DNZ_DNS_ADDR=0.0.0.0:53, DNZ_HTTP_ADDR=0.0.0.0:8080 and
DNZ_DATABASE_URL=sqlite:///data/dnz.db. Because the environment beats the config file, change
those in the environment, not in a mounted dnz.toml.
To keep the data in Postgres instead, see Docker with Postgres.
Health
The image has aHEALTHCHECK that runs dnz healthcheck, so docker ps shows healthy once the
API answers. If it shows unhealthy, check docker compose logs dnz: usually a port that couldn’t
be bound or a /data volume that isn’t writable.
Port 53 on the host
Publishing53:53 fails when something on the host already uses port 53, most often
systemd-resolved. Either free the port (see Port 53 and systemd-resolved), or
publish on one address only:
Updating
terrificci/dnz:1.0.0 instead of
latest to choose when you update.