From 523b23ec9ab3c3064e2e5d753ea29a3f0a857d9b Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Fri, 15 Jan 2016 18:20:56 +0100 Subject: [PATCH 1/3] powerdns:postgres --- .travis.yml | 1 + 3.4/postgres/Dockerfile | 25 +++++++++++++++++++++++++ 3.4/postgres/docker-compose.yml | 9 +++++++++ 3.4/postgres/pdns.conf | 2 ++ 4 files changed, 37 insertions(+) create mode 100644 3.4/postgres/Dockerfile create mode 100644 3.4/postgres/docker-compose.yml create mode 100644 3.4/postgres/pdns.conf diff --git a/.travis.yml b/.travis.yml index be03e0d..3fc1178 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ env: - VERSION=3.4 VARIANT=bind - VERSION=3.4 VARIANT=geoip - VERSION=3.4 VARIANT=mysql + - VERSION=3.4 VARIANT=postgres - VERSION=3.4 VARIANT=sqlite3 before_script: diff --git a/3.4/postgres/Dockerfile b/3.4/postgres/Dockerfile new file mode 100644 index 0000000..d508600 --- /dev/null +++ b/3.4/postgres/Dockerfile @@ -0,0 +1,25 @@ +FROM alpine:3.3 + +MAINTAINER Sullivan SENECHAL + +RUN apk add --no-cache --virtual .deps boost-serialization libstdc++ \ +#&& apk add --no-cache --virtual .modules-deps sqlite-libs \ +&& apk add --no-cache --virtual .build-deps tar file gcc g++ make autoconf boost-dev \ +&& apk add --no-cache --virtual .modules-build-deps postgresql-dev \ + +&& wget http://downloads.powerdns.com/releases/pdns-3.4.7.tar.bz2 -O pdns.tar.bz2 \ +&& mkdir pdns && tar xf pdns.tar.bz2 -C pdns --strip-components 1 \ +&& rm -rf pdns.tar.bz2 \ +&& cd pdns \ +&& ./configure --with-modules="gpgsql" \ +&& make -j$(getconf _NPROCESSORS_ONLN) && make install && make clean \ +&& cd .. \ +&& rm -r pdns \ + +&& apk del .build-deps .modules-build-deps + +ADD pdns.conf /usr/local/etc/pdns.conf + +EXPOSE 53 + +CMD ["pdns_server", "--loglevel=9", "--log-dns-queries"] diff --git a/3.4/postgres/docker-compose.yml b/3.4/postgres/docker-compose.yml new file mode 100644 index 0000000..e754bf4 --- /dev/null +++ b/3.4/postgres/docker-compose.yml @@ -0,0 +1,9 @@ +pdns: + image: powerdns:postgres + link: + - postgres:db + ports: + - '53:53' + +postgres: + image: postgres diff --git a/3.4/postgres/pdns.conf b/3.4/postgres/pdns.conf new file mode 100644 index 0000000..96aad3d --- /dev/null +++ b/3.4/postgres/pdns.conf @@ -0,0 +1,2 @@ +launch=gpgsql +gsqlite3-database=db.sqlite3 From eb2159e398d0cc32c56d660418749dae5b200247 Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Sat, 16 Jan 2016 14:45:55 +0100 Subject: [PATCH 2/3] make-v1 --- 3.4/postgres/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/3.4/postgres/Dockerfile b/3.4/postgres/Dockerfile index d508600..62d0970 100644 --- a/3.4/postgres/Dockerfile +++ b/3.4/postgres/Dockerfile @@ -4,15 +4,15 @@ MAINTAINER Sullivan SENECHAL RUN apk add --no-cache --virtual .deps boost-serialization libstdc++ \ #&& apk add --no-cache --virtual .modules-deps sqlite-libs \ -&& apk add --no-cache --virtual .build-deps tar file gcc g++ make autoconf boost-dev \ +&& apk add --no-cache --virtual .build-deps openssl tar file gcc g++ make autoconf boost-dev \ && apk add --no-cache --virtual .modules-build-deps postgresql-dev \ -&& wget http://downloads.powerdns.com/releases/pdns-3.4.7.tar.bz2 -O pdns.tar.bz2 \ +&& wget https://downloads.powerdns.com/releases/pdns-3.4.7.tar.bz2 -O pdns.tar.bz2 \ && mkdir pdns && tar xf pdns.tar.bz2 -C pdns --strip-components 1 \ && rm -rf pdns.tar.bz2 \ && cd pdns \ && ./configure --with-modules="gpgsql" \ -&& make -j$(getconf _NPROCESSORS_ONLN) && make install && make clean \ +&& make -j$(getconf _NPROCESSORS_ONLN) V=1 && make install && make clean \ && cd .. \ && rm -r pdns \ From d4fed5f8056429fb331525c7a570ccda693cc1b2 Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Mon, 18 Jan 2016 10:04:01 +0100 Subject: [PATCH 3/3] Apply https://github.com/PowerDNS/pdns/pull/1990 patch --- 3.4/postgres/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/3.4/postgres/Dockerfile b/3.4/postgres/Dockerfile index 62d0970..d97d9a2 100644 --- a/3.4/postgres/Dockerfile +++ b/3.4/postgres/Dockerfile @@ -11,6 +11,8 @@ RUN apk add --no-cache --virtual .deps boost-serialization libstdc++ \ && mkdir pdns && tar xf pdns.tar.bz2 -C pdns --strip-components 1 \ && rm -rf pdns.tar.bz2 \ && cd pdns \ +&& wget https://github.com/PowerDNS/pdns/pull/1990.patch -O 1990.patch \ +&& patch < 1990.patch \ && ./configure --with-modules="gpgsql" \ && make -j$(getconf _NPROCESSORS_ONLN) V=1 && make install && make clean \ && cd .. \