mirror of
https://github.com/pschiffe/docker-pdns.git
synced 2025-01-18 11:01:14 +01:00
Compare commits
3 commits
fa5c8075ed
...
9618517672
Author | SHA1 | Date | |
---|---|---|---|
|
9618517672 | ||
|
036420859d | ||
|
f14e4be008 |
15 changed files with 33 additions and 33 deletions
|
@ -57,7 +57,7 @@
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ulimits:
|
ulimits:
|
||||||
- 'nofile:5000:5000'
|
- 'nofile:10000:10000'
|
||||||
tags:
|
tags:
|
||||||
- pdns-recursor
|
- pdns-recursor
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
env:
|
env:
|
||||||
MYSQL_ROOT_PASSWORD: 'my-secret-pw'
|
MYSQL_ROOT_PASSWORD: 'my-secret-pw'
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'healthcheck.sh', '--su=mysql', '--connect', '--innodb_initialized']
|
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 5
|
retries: 5
|
||||||
tags:
|
tags:
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
env:
|
env:
|
||||||
PDNS_ADMIN_SQLA_DB_PASSWORD: 'my-secret-pw'
|
PDNS_ADMIN_SQLA_DB_PASSWORD: 'my-secret-pw'
|
||||||
PDNS_VERSION: '4.8'
|
PDNS_VERSION: '4.9'
|
||||||
PDNS_API_KEY: 'secret'
|
PDNS_API_KEY: 'secret'
|
||||||
tags:
|
tags:
|
||||||
- pdns-admin
|
- pdns-admin
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ulimits:
|
ulimits:
|
||||||
- 'nofile:5000:5000'
|
- 'nofile:10000:10000'
|
||||||
tags:
|
tags:
|
||||||
- pdns-recursor
|
- pdns-recursor
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
PDNS_ADMIN_SQLA_DB_PORT: '5432'
|
PDNS_ADMIN_SQLA_DB_PORT: '5432'
|
||||||
PDNS_ADMIN_SQLA_DB_USER: 'postgres'
|
PDNS_ADMIN_SQLA_DB_USER: 'postgres'
|
||||||
PDNS_ADMIN_SQLA_DB_PASSWORD: 'my-secret-pw'
|
PDNS_ADMIN_SQLA_DB_PASSWORD: 'my-secret-pw'
|
||||||
PDNS_VERSION: '4.8'
|
PDNS_VERSION: '4.9'
|
||||||
PDNS_API_KEY: 'secret'
|
PDNS_API_KEY: 'secret'
|
||||||
tags:
|
tags:
|
||||||
- pdns-admin
|
- pdns-admin
|
||||||
|
|
|
@ -9,8 +9,8 @@ services:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
soft: 5000
|
soft: 10000
|
||||||
hard: 5000
|
hard: 10000
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
image: mariadb:11-ubi
|
image: mariadb:11-ubi
|
||||||
|
@ -26,7 +26,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=my-secret-pw
|
- MYSQL_ROOT_PASSWORD=my-secret-pw
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'healthcheck.sh', '--su=mysql', '--connect', '--innodb_initialized']
|
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ services:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
environment:
|
environment:
|
||||||
- PDNS_ADMIN_SQLA_DB_PASSWORD=my-secret-pw
|
- PDNS_ADMIN_SQLA_DB_PASSWORD=my-secret-pw
|
||||||
- PDNS_VERSION=4.8
|
- PDNS_VERSION=4.9
|
||||||
- PDNS_API_KEY=secret
|
- PDNS_API_KEY=secret
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
|
|
|
@ -8,8 +8,8 @@ services:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
soft: 5000
|
soft: 10000
|
||||||
hard: 5000
|
hard: 10000
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
image: mariadb:11-ubi
|
image: mariadb:11-ubi
|
||||||
|
@ -24,7 +24,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=my-secret-pw
|
- MYSQL_ROOT_PASSWORD=my-secret-pw
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'healthcheck.sh', '--su=mysql', '--connect', '--innodb_initialized']
|
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ services:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
environment:
|
environment:
|
||||||
- PDNS_ADMIN_SQLA_DB_PASSWORD=my-secret-pw
|
- PDNS_ADMIN_SQLA_DB_PASSWORD=my-secret-pw
|
||||||
- PDNS_VERSION=4.8
|
- PDNS_VERSION=4.9
|
||||||
- PDNS_API_KEY=secret
|
- PDNS_API_KEY=secret
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
|
|
|
@ -8,8 +8,8 @@ services:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
soft: 5000
|
soft: 10000
|
||||||
hard: 5000
|
hard: 10000
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:16-alpine
|
image: postgres:16-alpine
|
||||||
|
@ -108,7 +108,7 @@ services:
|
||||||
- PDNS_ADMIN_SQLA_DB_PORT=5432
|
- PDNS_ADMIN_SQLA_DB_PORT=5432
|
||||||
- PDNS_ADMIN_SQLA_DB_USER=postgres
|
- PDNS_ADMIN_SQLA_DB_USER=postgres
|
||||||
- PDNS_ADMIN_SQLA_DB_PASSWORD=my-secret-pw
|
- PDNS_ADMIN_SQLA_DB_PASSWORD=my-secret-pw
|
||||||
- PDNS_VERSION=4.8
|
- PDNS_VERSION=4.9
|
||||||
- PDNS_API_KEY=secret
|
- PDNS_API_KEY=secret
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
|
|
|
@ -48,7 +48,7 @@ spec:
|
||||||
- name: PDNS_API_URL
|
- name: PDNS_API_URL
|
||||||
value: "http://master-api-pdns:8081/"
|
value: "http://master-api-pdns:8081/"
|
||||||
- name: PDNS_VERSION
|
- name: PDNS_VERSION
|
||||||
value: "4.8"
|
value: "4.9"
|
||||||
- name: PDNS_API_KEY
|
- name: PDNS_API_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
|
|
@ -28,7 +28,7 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
||||||
uwsgi \
|
uwsgi \
|
||||||
uwsgi-plugin-python3 \
|
uwsgi-plugin-python3 \
|
||||||
yarn \
|
yarn \
|
||||||
https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.rpm \
|
https://github.com/TektonOps/subvars/releases/download/v0.1.5/subvars_${arch}.rpm \
|
||||||
&& dnf clean all
|
&& dnf clean all
|
||||||
|
|
||||||
RUN mkdir -p /opt/powerdns-admin \
|
RUN mkdir -p /opt/powerdns-admin \
|
||||||
|
|
|
@ -15,7 +15,7 @@ CAPTCHA_SESSION_KEY = 'captcha_image'
|
||||||
|
|
||||||
SESSION_TYPE = 'sqlalchemy'
|
SESSION_TYPE = 'sqlalchemy'
|
||||||
|
|
||||||
# SAML Authnetication
|
# SAML Authentication
|
||||||
SAML_ENABLED = False
|
SAML_ENABLED = False
|
||||||
|
|
||||||
# Configuration from env vars
|
# Configuration from env vars
|
||||||
|
|
|
@ -39,7 +39,7 @@ subvars --prefix 'PDNS_ADMIN_' < '/config.py.tpl' > '/opt/powerdns-admin/powerdn
|
||||||
|
|
||||||
# Initialize DB if needed
|
# Initialize DB if needed
|
||||||
if [[ "${PDNS_ADMIN_SQLA_DB_TYPE}" == 'mysql' ]]; then
|
if [[ "${PDNS_ADMIN_SQLA_DB_TYPE}" == 'mysql' ]]; then
|
||||||
SQL_COMMAND="mysql -h ${PDNS_ADMIN_SQLA_DB_HOST} -P ${PDNS_ADMIN_SQLA_DB_PORT} -u ${PDNS_ADMIN_SQLA_DB_USER} -p${PDNS_ADMIN_SQLA_DB_PASSWORD} -e"
|
SQL_COMMAND="mariadb -h ${PDNS_ADMIN_SQLA_DB_HOST} -P ${PDNS_ADMIN_SQLA_DB_PORT} -u ${PDNS_ADMIN_SQLA_DB_USER} -p${PDNS_ADMIN_SQLA_DB_PASSWORD} -e"
|
||||||
elif [[ "${PDNS_ADMIN_SQLA_DB_TYPE}" == 'postgres' ]]; then
|
elif [[ "${PDNS_ADMIN_SQLA_DB_TYPE}" == 'postgres' ]]; then
|
||||||
PGPASSWORD="${PDNS_ADMIN_SQLA_DB_PASSWORD}"
|
PGPASSWORD="${PDNS_ADMIN_SQLA_DB_PASSWORD}"
|
||||||
export PGPASSWORD
|
export PGPASSWORD
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM fedora:40
|
FROM fedora:41
|
||||||
|
|
||||||
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
||||||
&& echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
|
&& echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
|
||||||
|
@ -9,7 +9,7 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
||||||
hostname \
|
hostname \
|
||||||
mariadb \
|
mariadb \
|
||||||
pdns \
|
pdns \
|
||||||
https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.rpm \
|
https://github.com/TektonOps/subvars/releases/download/v0.1.5/subvars_${arch}.rpm \
|
||||||
&& dnf --setopt 'tsflags=' install pdns-backend-mysql \
|
&& dnf --setopt 'tsflags=' install pdns-backend-mysql \
|
||||||
&& dnf clean all
|
&& dnf clean all
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ RUN mkdir -p /run/pdns \
|
||||||
|
|
||||||
COPY pdns.conf.tpl docker-entrypoint.sh /
|
COPY pdns.conf.tpl docker-entrypoint.sh /
|
||||||
|
|
||||||
ENV VERSION=4.8 \
|
ENV VERSION=4.9 \
|
||||||
PDNS_guardian=yes \
|
PDNS_guardian=yes \
|
||||||
PDNS_setuid=pdns \
|
PDNS_setuid=pdns \
|
||||||
PDNS_setgid=pdns \
|
PDNS_setgid=pdns \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.20.0
|
FROM alpine:3.21
|
||||||
|
|
||||||
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
||||||
&& apk update \
|
&& apk update \
|
||||||
|
@ -8,7 +8,7 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
||||||
pdns \
|
pdns \
|
||||||
pdns-backend-mysql \
|
pdns-backend-mysql \
|
||||||
pdns-doc \
|
pdns-doc \
|
||||||
&& wget -O subvars.apk https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.apk \
|
&& wget -O subvars.apk https://github.com/TektonOps/subvars/releases/download/v0.1.5/subvars_${arch}.apk \
|
||||||
&& apk add --allow-untrusted subvars.apk \
|
&& apk add --allow-untrusted subvars.apk \
|
||||||
&& rm -rf subvars.apk /var/cache/apk/*
|
&& rm -rf subvars.apk /var/cache/apk/*
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ generateMySQLCommand() {
|
||||||
EXTRA="${EXTRA} --socket=${PDNS_gmysql_socket}"
|
EXTRA="${EXTRA} --socket=${PDNS_gmysql_socket}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MYSQL_COMMAND="mysql -h ${PDNS_gmysql_host} -P ${PDNS_gmysql_port} -u ${PDNS_gmysql_user}${EXTRA}"
|
MYSQL_COMMAND="mariadb -h ${PDNS_gmysql_host} -P ${PDNS_gmysql_port} -u ${PDNS_gmysql_user}${EXTRA}"
|
||||||
}
|
}
|
||||||
|
|
||||||
createDatabaseIfRequested() {
|
createDatabaseIfRequested() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM fedora:40
|
FROM fedora:41
|
||||||
|
|
||||||
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
||||||
&& echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
|
&& echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
|
||||||
|
@ -9,7 +9,7 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
||||||
hostname \
|
hostname \
|
||||||
pdns \
|
pdns \
|
||||||
postgresql16 \
|
postgresql16 \
|
||||||
https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.rpm \
|
https://github.com/TektonOps/subvars/releases/download/v0.1.5/subvars_${arch}.rpm \
|
||||||
&& dnf --setopt 'tsflags=' install pdns-backend-postgresql \
|
&& dnf --setopt 'tsflags=' install pdns-backend-postgresql \
|
||||||
&& dnf clean all
|
&& dnf clean all
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ RUN mkdir -p /run/pdns \
|
||||||
|
|
||||||
COPY pdns.conf.tpl docker-entrypoint.sh /
|
COPY pdns.conf.tpl docker-entrypoint.sh /
|
||||||
|
|
||||||
ENV VERSION=4.8 \
|
ENV VERSION=4.9 \
|
||||||
PDNS_guardian=yes \
|
PDNS_guardian=yes \
|
||||||
PDNS_setuid=pdns \
|
PDNS_setuid=pdns \
|
||||||
PDNS_setgid=pdns \
|
PDNS_setgid=pdns \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.20.0
|
FROM alpine:3.21
|
||||||
|
|
||||||
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
||||||
&& apk update \
|
&& apk update \
|
||||||
|
@ -8,7 +8,7 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
|
||||||
pdns-backend-pgsql \
|
pdns-backend-pgsql \
|
||||||
pdns-doc \
|
pdns-doc \
|
||||||
postgresql16-client \
|
postgresql16-client \
|
||||||
&& wget -O subvars.apk https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.apk \
|
&& wget -O subvars.apk https://github.com/TektonOps/subvars/releases/download/v0.1.5/subvars_${arch}.apk \
|
||||||
&& apk add --allow-untrusted subvars.apk \
|
&& apk add --allow-untrusted subvars.apk \
|
||||||
&& rm -rf subvars.apk /var/cache/apk/*
|
&& rm -rf subvars.apk /var/cache/apk/*
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -eu
|
||||||
|
|
||||||
#### Function definitions
|
#### Function definitions
|
||||||
|
|
||||||
deriveConfigValuesFromEnvrionement() {
|
deriveConfigValuesFromEnvironment() {
|
||||||
# Configure base vars
|
# Configure base vars
|
||||||
: "${PDNS_local_port:=53}"
|
: "${PDNS_local_port:=53}"
|
||||||
: "${PDNS_local_address:=0.0.0.0}"
|
: "${PDNS_local_address:=0.0.0.0}"
|
||||||
|
@ -24,7 +24,7 @@ elif [ -f /etc/alpine-release ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${USE_EXISTING_CONFIG_FILE:-false}" = 'false' ]; then
|
if [ "${USE_EXISTING_CONFIG_FILE:-false}" = 'false' ]; then
|
||||||
deriveConfigValuesFromEnvrionement
|
deriveConfigValuesFromEnvironment
|
||||||
echo "Generating config file from environment"
|
echo "Generating config file from environment"
|
||||||
subvars --prefix 'PDNS_' < '/recursor.conf.tpl' > "${config_file}"
|
subvars --prefix 'PDNS_' < '/recursor.conf.tpl' > "${config_file}"
|
||||||
chown "${pdns_user}:" "${config_file}"
|
chown "${pdns_user}:" "${config_file}"
|
||||||
|
|
Loading…
Reference in a new issue