Skip to content

Commit

Permalink
Update Fedora and Alpine base images
Browse files Browse the repository at this point in the history
PDNS Recursor is now at version 5.0 and PDNS Alpine version at 4.9.
PDNS Fedora version stays at 4.8 for now.
  • Loading branch information
pschiffe committed Jun 3, 2024
1 parent 3ba3021 commit 950b862
Show file tree
Hide file tree
Showing 18 changed files with 121 additions and 131 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PowerDNS Docker Images

This repository contains the following Docker images - pdns-mysql, pdns-pgsql, pdns-recursor and pdns-admin. Image **pdns-mysql** contains completely configurable [PowerDNS 4.x server](https://doc.powerdns.com/authoritative/) with mysql backend (without mysql server). Image **pdns-pgsql** contains completely configurable [PowerDNS 4.x server](https://doc.powerdns.com/authoritative/) with postgres backend (without postgres server). Image **pdns-recursor** contains completely configurable [PowerDNS 4.x recursor](https://doc.powerdns.com/recursor/). Image **pdns-admin** contains fronted (Caddy) and backend (uWSGI) for the [PowerDNS Admin](https://github.com/PowerDNS-Admin/PowerDNS-Admin) web app, which is written in Flask and used for managing PowerDNS servers.
This repository contains the following Docker images - pdns-mysql, pdns-pgsql, pdns-recursor and pdns-admin. Image **pdns-mysql** contains completely configurable [PowerDNS 4.x server](https://doc.powerdns.com/authoritative/) with mysql backend (without mysql server). Image **pdns-pgsql** contains completely configurable [PowerDNS 4.x server](https://doc.powerdns.com/authoritative/) with postgres backend (without postgres server). Image **pdns-recursor** contains completely configurable [PowerDNS 5.x recursor](https://doc.powerdns.com/recursor/). Image **pdns-admin** contains fronted (Caddy) and backend (uWSGI) for the [PowerDNS Admin](https://github.com/PowerDNS-Admin/PowerDNS-Admin) web app, which is written in Flask and used for managing PowerDNS servers.

The pdns-mysql, pdns-pgsql and pdns-recursor images have also the `alpine` tag, thanks to @PoppyPop.

Expand Down Expand Up @@ -52,7 +52,7 @@ Example of a master server with the API enabled and one slave server configured:
```
docker run -d -p 53:53 -p 53:53/udp --name pdns-master \
--hostname ns1.example.com --link mariadb:mysql \
-e PDNS_master=yes \
-e PDNS_primary=yes \
-e PDNS_api=yes \
-e PDNS_api_key=secret \
-e PDNS_webserver=yes \
Expand All @@ -70,7 +70,8 @@ Example of a slave server with a supermaster:
docker run -d -p 53:53 -p 53:53/udp --name pdns-slave \
--hostname ns2.example.com --link mariadb:mysql \
-e PDNS_gmysql_dbname=powerdnsslave \
-e PDNS_slave=yes \
-e PDNS_secondary=yes \
-e PDNS_autosecondary=yes \
-e PDNS_version_string=anonymous \
-e PDNS_disable_axfr=yes \
-e PDNS_allow_notify_from=172.5.0.20 \
Expand Down Expand Up @@ -109,7 +110,7 @@ Example of a master server with the API enabled and one slave server configured:
```
docker run -d -p 53:53 -p 53:53/udp --name pdns-master \
--hostname ns1.example.com --link postgres:pgsql \
-e PDNS_master=yes \
-e PDNS_primary=yes \
-e PDNS_api=yes \
-e PDNS_api_key=secret \
-e PDNS_webserver=yes \
Expand All @@ -127,7 +128,8 @@ Example of a slave server with a supermaster:
docker run -d -p 53:53 -p 53:53/udp --name pdns-slave \
--hostname ns2.example.com --link postgres:pgsql \
-e PDNS_gpgsql_dbname=powerdnsslave \
-e PDNS_slave=yes \
-e PDNS_secondary=yes \
-e PDNS_autosecondary=yes \
-e PDNS_version_string=anonymous \
-e PDNS_disable_axfr=yes \
-e PDNS_allow_notify_from=172.5.0.20 \
Expand All @@ -141,7 +143,7 @@ docker run -d -p 53:53 -p 53:53/udp --name pdns-slave \

https://hub.docker.com/r/pschiffe/pdns-recursor/

Docker image with [PowerDNS 4.x recursor](https://doc.powerdns.com/recursor/).
Docker image with [PowerDNS 5.x recursor](https://doc.powerdns.com/recursor/).

PowerDNS recursor is configurable via env vars. Every variable starting with `PDNS_` will be inserted into `/etc/pdns/recursor.conf` conf file in the following way: prefix `PDNS_` will be stripped away and every `_` will be replaced with `-`. For example, from the above mysql config, `PDNS_gmysql_host=mysql` will became `gmysql-host=mysql` in `/etc/pdns/recursor.conf` file. This way, you can configure PowerDNS recursor any way you need within a `docker run` command.

Expand Down
8 changes: 4 additions & 4 deletions ansible-playbook-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
- name: DB
community.docker.docker_container:
name: pdns-mariadb
image: mariadb:11
image: mariadb:11-ubi
pull: true
state: '{{ c_state }}'
networks:
Expand Down Expand Up @@ -147,7 +147,7 @@
- /etc/localtime:/etc/localtime:ro
env:
PDNS_gmysql_password: 'my-secret-pw'
PDNS_master: 'yes'
PDNS_primary: 'yes'
PDNS_api: 'yes'
PDNS_api_key: 'secret'
PDNS_webserver: 'yes'
Expand Down Expand Up @@ -177,8 +177,8 @@
env:
PDNS_gmysql_dbname: 'powerdnsslave'
PDNS_gmysql_password: 'my-secret-pw'
PDNS_slave: 'yes'
PDNS_superslave: 'yes'
PDNS_secondary: 'yes'
PDNS_autosecondary: 'yes'
PDNS_webserver: 'yes'
PDNS_webserver_address: '0.0.0.0'
PDNS_webserver_allow_from: '172.5.0.0/16'
Expand Down
6 changes: 3 additions & 3 deletions ansible-playbook-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
- /etc/localtime:/etc/localtime:ro
env:
PDNS_gpgsql_password: 'my-secret-pw'
PDNS_master: 'yes'
PDNS_primary: 'yes'
PDNS_api: 'yes'
PDNS_api_key: 'secret'
PDNS_webserver: 'yes'
Expand Down Expand Up @@ -173,8 +173,8 @@
env:
PDNS_gpgsql_dbname: 'powerdnsslave'
PDNS_gpgsql_password: 'my-secret-pw'
PDNS_slave: 'yes'
PDNS_superslave: 'yes'
PDNS_secondary: 'yes'
PDNS_autosecondary: 'yes'
PDNS_webserver: 'yes'
PDNS_webserver_address: '0.0.0.0'
PDNS_webserver_allow_from: '172.7.0.0/16'
Expand Down
10 changes: 4 additions & 6 deletions docker-compose-mysql-ipv6.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '2.4'

services:

pdns-recursor-mysql:
Expand All @@ -15,7 +13,7 @@ services:
hard: 5000

mariadb:
image: mariadb:11
image: mariadb:11-ubi
networks:
pdns-mysql:
aliases:
Expand Down Expand Up @@ -61,7 +59,7 @@ services:
- /etc/localtime:/etc/localtime:ro
environment:
- PDNS_gmysql_password=my-secret-pw
- PDNS_master=yes
- PDNS_primary=yes
- PDNS_api=yes
- PDNS_api_key=secret
- PDNS_webserver=yes
Expand All @@ -88,8 +86,8 @@ services:
environment:
- PDNS_gmysql_dbname=powerdnsslave
- PDNS_gmysql_password=my-secret-pw
- PDNS_slave=yes
- PDNS_superslave=yes
- PDNS_secondary=yes
- PDNS_autosecondary=yes
- PDNS_webserver=yes
- PDNS_webserver_address=0.0.0.0
- PDNS_webserver_allow_from=${NETWORK_IPV6_PREFIX}::/${NETWORK_IPV6_PREFIX_LENGTH}
Expand Down
10 changes: 4 additions & 6 deletions docker-compose-mysql.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '2.4'

services:

pdns-recursor-mysql:
Expand All @@ -14,7 +12,7 @@ services:
hard: 5000

mariadb:
image: mariadb:11
image: mariadb:11-ubi
networks:
pdns-mysql:
aliases:
Expand Down Expand Up @@ -58,7 +56,7 @@ services:
- /etc/localtime:/etc/localtime:ro
environment:
- PDNS_gmysql_password=my-secret-pw
- PDNS_master=yes
- PDNS_primary=yes
- PDNS_api=yes
- PDNS_api_key=secret
- PDNS_webserver=yes
Expand All @@ -85,8 +83,8 @@ services:
environment:
- PDNS_gmysql_dbname=powerdnsslave
- PDNS_gmysql_password=my-secret-pw
- PDNS_slave=yes
- PDNS_superslave=yes
- PDNS_secondary=yes
- PDNS_autosecondary=yes
- PDNS_webserver=yes
- PDNS_webserver_address=0.0.0.0
- PDNS_webserver_allow_from=172.6.0.0/16
Expand Down
8 changes: 3 additions & 5 deletions docker-compose-pgsql.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '2.4'

services:

pdns-recursor-pgsql:
Expand Down Expand Up @@ -54,7 +52,7 @@ services:
- /etc/localtime:/etc/localtime:ro
environment:
- PDNS_gpgsql_password=my-secret-pw
- PDNS_master=yes
- PDNS_primary=yes
- PDNS_api=yes
- PDNS_api_key=secret
- PDNS_webserver=yes
Expand All @@ -81,8 +79,8 @@ services:
environment:
- PDNS_gpgsql_dbname=powerdnsslave
- PDNS_gpgsql_password=my-secret-pw
- PDNS_slave=yes
- PDNS_superslave=yes
- PDNS_secondary=yes
- PDNS_autosecondary=yes
- PDNS_webserver=yes
- PDNS_webserver_address=0.0.0.0
- PDNS_webserver_allow_from=172.8.0.0/16
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/mariadb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
spec:
containers:
- name: mariadb-pdns
image: mariadb:11
image: mariadb:11-ubi
imagePullPolicy: Always
env:
- name: MYSQL_ROOT_PASSWORD
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/master-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
value: "master_"
- name: PDNS_version_string
value: "anonymous"
- name: PDNS_master
- name: PDNS_primary
value: "yes"
- name: PDNS_api
value: "yes"
Expand Down
6 changes: 3 additions & 3 deletions examples/kubernetes/slave-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
app.kubernetes.io/name: pdns-slave
app.kubernetes.io/part-of: pdns
app.kubernetes.io/component: slave
name: pdns-slave
name: pdns-slave
spec:
revisionHistoryLimit: 10
selector:
Expand Down Expand Up @@ -53,9 +53,9 @@ spec:
value: "anonymous"
- name: PDNS_disable_axfr
value: "yes"
- name: PDNS_slave
- name: PDNS_secondary
value: "yes"
- name: PDNS_superslave
- name: PDNS_autosecondary
value: "yes"
- name: PDNS_allow_unsigned_supermaster
value: "no"
Expand Down
2 changes: 1 addition & 1 deletion pdns-mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fedora:39
FROM fedora:40

RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
&& echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
Expand Down
4 changes: 2 additions & 2 deletions pdns-mysql/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.19.1
FROM alpine:3.20.0

RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
&& apk update \
Expand All @@ -17,7 +17,7 @@ RUN mkdir -p /run/pdns \

COPY pdns.conf.tpl docker-entrypoint.sh /

ENV VERSION=4.8 \
ENV VERSION=4.9 \
PDNS_guardian=yes \
PDNS_setuid=pdns \
PDNS_setgid=pdns \
Expand Down
Loading

0 comments on commit 950b862

Please sign in to comment.