Skip to content

Commit 9c49f48

Browse files
authored
add: PowerDNS (#876)
1 parent 8ac623a commit 9c49f48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2992
-3153
lines changed

.dns/dns_api.py

Lines changed: 0 additions & 1395 deletions
This file was deleted.

.dns/entrypoint.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

.dns/templates/zone.template

Lines changed: 0 additions & 11 deletions
This file was deleted.

.dns/templates/zone_options.template

Lines changed: 0 additions & 10 deletions
This file was deleted.

.docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ENV VIRTUAL_ENV=/venvs/.venv \
3535
VERSION=${VERSION:-beta}
3636

3737

38-
RUN set -eux; apk add --no-cache krb5-libs curl openssl netcat-openbsd
38+
RUN set -eux; apk add --no-cache krb5-libs curl openssl netcat-openbsd libsodium-dev
3939
COPY app /app
4040
COPY pyproject.toml /
4141

.docker/bind9.Dockerfile

Lines changed: 0 additions & 45 deletions
This file was deleted.

.docker/dev.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ENV VIRTUAL_ENV=/venvs/.venv \
3333
PATH="/venvs/.venv/bin:$PATH" \
3434
VERSION=${VERSION:-beta}
3535

36-
RUN set -eux; apk add --no-cache krb5-libs curl openssl netcat-openbsd
36+
RUN set -eux; apk add --no-cache krb5-libs curl openssl netcat-openbsd libsodium-dev
3737

3838
COPY app /app
3939
COPY pyproject.toml /

.docker/pdns_auth.Dockerfile

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
FROM alpine:3.20 AS builder
2+
3+
RUN apk add --no-cache --virtual .build-deps \
4+
build-base \
5+
lmdb-dev \
6+
openssl-dev \
7+
boost-dev \
8+
autoconf automake libtool \
9+
git ragel bison flex \
10+
lua5.4-dev \
11+
curl-dev
12+
13+
RUN apk add --no-cache \
14+
lua \
15+
lua-dev \
16+
lmdb \
17+
boost-libs \
18+
openssl-libs-static \
19+
curl \
20+
libstdc++
21+
22+
RUN git clone https://github.com/PowerDNS/pdns.git /pdns
23+
WORKDIR /pdns
24+
25+
RUN git submodule init &&\
26+
git submodule update &&\
27+
git checkout auth-5.0.1
28+
29+
RUN autoreconf -vi
30+
31+
RUN mkdir /build && \
32+
./configure \
33+
--sysconfdir=/etc/powerdns \
34+
--enable-option-checking=fatal \
35+
--with-dynmodules='lmdb' \
36+
--with-modules='' \
37+
--with-unixodbc-lib=/usr/lib/$(dpkg-architecture -q DEB_BUILD_GNU_TYPE) && \
38+
make clean && \
39+
make $MAKEFLAGS -C ext &&\
40+
make $MAKEFLAGS -C modules &&\
41+
make $MAKEFLAGS -C pdns && \
42+
make -C pdns install DESTDIR=/build &&\
43+
make -C modules install DESTDIR=/build &&\
44+
make clean && \
45+
strip /build/usr/local/bin/* /build/usr/local/sbin/* /build/usr/local/lib/pdns/*.so
46+
47+
FROM alpine:3.20 AS runtime
48+
49+
COPY --from=builder /build /
50+
51+
RUN apk add --no-cache \
52+
lua \
53+
lua-dev \
54+
lmdb \
55+
boost-libs \
56+
openssl-libs-static \
57+
curl \
58+
libstdc++
59+
60+
RUN mkdir -p /etc/powerdns/pdns.d /var/run/pdns /var/lib/powerdns /etc/powerdns/templates.d /var/lib/pdns-lmdb
61+
62+
COPY ./.package/pdns.conf /etc/powerdns/pdns.conf
63+
64+
EXPOSE 8082/tcp
65+
66+
CMD ["/usr/local/sbin/pdns_server"]

.docker/test.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
2727
FROM python:3.13.7-alpine3.21 AS runtime
2828

2929
WORKDIR /app
30-
RUN set -eux; apk add --no-cache openldap-clients openssl curl krb5-libs
30+
RUN set -eux; apk add --no-cache openldap-clients openssl curl krb5-libs libsodium-dev
3131

3232
ENV VIRTUAL_ENV=/venvs/.venv \
3333
PATH="/venvs/.venv/bin:$PATH" \

.github/workflows/build-beta.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
--build-arg BUILDKIT_INLINE_CACHE=1 \
157157
--build-arg VERSION=beta
158158
159-
build-bind9:
159+
build-pdns_auth:
160160
runs-on: ubuntu-latest
161161
needs: [build-tests, run-ssh-test, run-tests]
162162
steps:
@@ -173,14 +173,14 @@ jobs:
173173

174174
- name: Build docker image
175175
env:
176-
TAG: ghcr.io/${{ env.REPO }}_bind9:beta
176+
TAG: ghcr.io/${{ env.REPO }}_pdns_auth:beta
177177
DOCKER_BUILDKIT: '1'
178178
run: |
179179
echo $TAG
180180
docker build \
181181
--push \
182182
--target=runtime \
183-
-f .docker/bind9.Dockerfile . \
183+
-f .docker/pdns_auth.Dockerfile . \
184184
-t $TAG \
185185
--cache-to type=gha,mode=max \
186186
--cache-from $TAG \

0 commit comments

Comments
 (0)