Skip to content

Commit a204493

Browse files
committed
docs(docker): configure PowerDNS via pdns.conf, official image ignores PDNS_ env vars (fixes #1)
1 parent ef12d08 commit a204493

1 file changed

Lines changed: 24 additions & 10 deletions

File tree

docs/installation/docker.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,8 @@ services:
156156
ports:
157157
- "53:53/udp"
158158
- "53:53/tcp"
159-
environment:
160-
PDNS_gmysql_host: mysql
161-
PDNS_gmysql_user: pdns
162-
PDNS_gmysql_password: pdns-password
163-
PDNS_gmysql_dbname: pdns
164-
PDNS_api: "yes"
165-
PDNS_api_key: your-api-key
166-
PDNS_webserver: "yes"
167-
PDNS_webserver_address: "0.0.0.0"
168-
PDNS_webserver_allow_from: "0.0.0.0/0"
159+
volumes:
160+
- ./pdns.conf:/etc/powerdns/pdns.conf:ro
169161
depends_on:
170162
- mysql
171163

@@ -181,6 +173,28 @@ volumes:
181173
mysql-data:
182174
```
183175
176+
The official `powerdns/pdns-auth-*` images do not read `PDNS_*` environment
177+
variables — that convention belongs to third-party images, and the official
178+
image silently ignores them (see
179+
[PowerDNS/pdns#14951](https://github.com/PowerDNS/pdns/issues/14951)). The only
180+
configuration variable it honors is `PDNS_AUTH_API_KEY`; everything else has to
181+
come from a config file or command-line arguments. The example above mounts a
182+
`pdns.conf` next to the compose file:
183+
184+
```ini
185+
launch=gmysql
186+
gmysql-host=mysql
187+
gmysql-user=pdns
188+
gmysql-password=pdns-password
189+
gmysql-dbname=pdns
190+
191+
api=yes
192+
api-key=your-api-key
193+
webserver=yes
194+
webserver-address=0.0.0.0
195+
webserver-allow-from=0.0.0.0/0
196+
```
197+
184198
## Admin User Creation
185199

186200
The container can automatically create an admin user on first startup:

0 commit comments

Comments
 (0)