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..d97d9a2 --- /dev/null +++ b/3.4/postgres/Dockerfile @@ -0,0 +1,27 @@ +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 openssl tar file gcc g++ make autoconf boost-dev \ +&& apk add --no-cache --virtual .modules-build-deps postgresql-dev \ + +&& 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 \ +&& 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 .. \ +&& 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