I have docker-compose.yml
file to build PowerDNS auth server:
version: '3.9'
services:
auth:
build:
context: pdns/
dockerfile: Dockerfile-auth
environment:
- PDNS_AUTH_API_KEY
- PDNS_LOGLEVEL=7
- PDNS_PRIMARY=yes
- PDNS_LAUNCH=gpgsql
- PDNS_GPGSQL_HOST=pgdb
- PDNS_GPGSQL_USER=pdns
- PDNS_GPGSQL_PASSWORD=***
- PDNS_GPGSQL_DBNAME=pdns
ports:
- "1053:53"
- "1053:53/udp"
- "8081:8081"
user: "1000:1000"
But when starting built container, I see that LAUNCH=gpgsql
has no effect.
Oct 17 05:59:57 Loading '/usr/local/lib/pdns/libgsqlite3backend.so'
Oct 17 05:59:57 This is a standalone pdns
Oct 17 05:59:57 Listening on controlsocket in '/var/run/pdns/pdns.controlsocket'
Oct 17 05:59:57 UDP server bound to 0.0.0.0:53
Oct 17 05:59:57 UDP server bound to [::]:53
Oct 17 05:59:57 TCP server bound to 0.0.0.0:53
Oct 17 05:59:57 TCP server bound to [::]:53
Oct 17 05:59:57 PowerDNS Authoritative Server 4.8.0-alpha0.494.master.g4189b2d41 (C) 2001-2022 PowerDNS.COM BV
Oct 17 05:59:57 Using 64-bits mode. Built using gcc 10.2.1 20210110 on Oct 16 2022 13:14:45 by root@localhost.
Oct 17 05:59:57 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
Oct 17 05:59:57 Not validating response for security status update, this is a non-release version
Oct 17 05:59:57 gsqlite3: connection failed: SQLite database '/var/lib/powerdns/pdns.sqlite3' does not exist yet
Oct 17 05:59:57 Caught an exception instantiating a backend: Unable to launch gsqlite3 connection: SQLite database '/var/lib/powerdns/pdns.sqlite3' does not exist yet
Oct 17 05:59:57 Cleaning up
Oct 17 05:59:57 PDNSException while filling the zone cache: Unable to launch gsqlite3 connection: SQLite database '/var/lib/powerdns/pdns.sqlite3' does not exist yet
Notice. PowerDNS tries to load sqlite3
.
When I mounted configuration file, then option is recognized:
volumes:
- ./volumes/pdns.conf:/etc/powerdns/pdns.conf
cat ./volumes/pdns.conf
:
loglevel=7
primary=yes
launch=gpgsql
gpgsql-host=pgdb
gpgsql-user=pdns
gpgsql-password=***
gpgsql-dbname=pdns
Why environment variable - PDNS_LAUNCH=gpgsql
, setted up from docker compose, was not recognized by PowerDNS?