RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y --no-install-recommends devscripts equivs git && apt-get clean
# import everything - this could be pdns.git OR an auth tarball!
-COPY . /source
+COPY builder-support /source/builder-support
# TODO: control file is not in tarballs at all right now
RUN mk-build-deps -i -t 'apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends' /source/builder-support/debian/authoritative/debian-buster/control && \
# build and install (TODO: before we hit this line, rearrange /source structure if we are coming from a tarball)
WORKDIR /source/
+COPY pdns /source/pdns
+COPY modules /source/modules
+COPY codedocs /source/codedocs
+COPY docs /source/docs
+COPY build-aux /source/build-aux
+COPY m4 /source/m4
+COPY ext /source/ext
+COPY .git /source/.git
+ADD configure.ac Makefile.am /source/
+
ARG MAKEFLAGS=
ENV MAKEFLAGS ${MAKEFLAGS:--j2}
# Start script
COPY dockerdata/startup.py /usr/local/sbin/pdns_server-startup
-# Config file(s) from builder
-# Should not grab this from builder - since it isn't being built
-COPY --from=builder /source/dockerdata/pdns.conf /etc/powerdns/
+COPY dockerdata/pdns.conf /etc/powerdns/
RUN mkdir -p /etc/powerdns/pdns.d /var/run/pdns /var/lib/powerdns /etc/powerdns/templates.d
# Work with pdns user - not root
# devscripts gives us mk-build-deps (and a lot of other stuff)
RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y --no-install-recommends devscripts equivs git && apt-get clean
-# import everything - this could be pdns.git OR a dnsdist tarball!
-COPY . /source
+COPY builder-support /source/builder-support
# TODO: control file is not in tarballs at all right now
RUN mk-build-deps -i -t 'apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends' /source/builder-support/debian/dnsdist/debian-buster/control && \
apt-get clean
+COPY pdns /source/pdns
+COPY build-aux /source/build-aux
+COPY m4 /source/m4
+COPY ext /source/ext
+COPY .git /source/.git
+
# build and install (TODO: before we hit this line, rearrange /source structure if we are coming from a tarball)
WORKDIR /source/pdns/dnsdistdist
# Config
RUN mkdir -p /etc/dnsdist/conf.d /etc/dnsdist/templates.d
-COPY --from=builder /source/dockerdata/dnsdist.conf /etc/dnsdist/
+COPY dockerdata/dnsdist.conf /etc/dnsdist/
# Start script
COPY dockerdata/startup.py /usr/local/bin/dnsdist-startup
WORKDIR /etc/dnsdist
-COPY --from=builder /source/dockerdata/dnsdist-resolver.lua /etc/dnsdist/
-COPY --from=builder /source/dockerdata/dnsdist-resolver.py /usr/local/bin/dnsdist-resolver
+COPY dockerdata/dnsdist-resolver.lua /etc/dnsdist/
+COPY dockerdata/dnsdist-resolver.py /usr/local/bin/dnsdist-resolver
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/dnsdist-startup"]
# devscripts gives us mk-build-deps (and a lot of other stuff)
RUN apt-get install -y --no-install-recommends devscripts equivs git curl && apt-get clean
-# import everything - this could be pdns.git OR a recursor tarball!
-COPY . /source
-
-# TODO: make sure /source looks roughly the same from git or tar
+COPY builder-support /source/builder-support
# TODO: control file is not in tarballs at all right now
RUN mk-build-deps -i -t 'apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends' /source/builder-support/debian/recursor/debian-buster/control && \
apt-get clean
# RUN apt-get -y install protobuf-compiler && apt-get clean
+COPY pdns /source/pdns
+COPY build-aux /source/build-aux
+COPY m4 /source/m4
+COPY ext /source/ext
+COPY .git /source/.git
+
# build and install (TODO: before we hit this line, rearrange /source structure if we are coming from a tarball)
WORKDIR /source/pdns/recursordist
COPY dockerdata/startup.py /usr/local/sbin/pdns_recursor-startup
# Config file(s) from builder
-# Should not grab this from builder - since it isn't being built
-COPY --from=builder /source/dockerdata/recursor.conf /etc/powerdns/
+COPY dockerdata/recursor.conf /etc/powerdns/
# Is recursor.d necessary if we copy the config into recursor.conf? (see above)
RUN mkdir -p /etc/powerdns/recursor.d /var/run/pdns-recursor /etc/powerdns/templates.d
-.PHONY: all build build-nocache dep
+.PHONY: all build build-nocache dep auth recursor dnsdist
VERSION=experimental
REVISION=1
all: build
-build:
+auth:
docker build --build-arg VERSION=$(VERSION) -t powerdns/pdns-auth-master:$(VERSION)-$(REVISION) --rm -f Dockerfile-auth .
+
+recursor:
docker build --build-arg VERSION=$(VERSION) -t powerdns/pdns-recursor-master:$(VERSION)-$(REVISION) --rm -f Dockerfile-recursor .
+
+dnsdist:
docker build --build-arg VERSION=$(VERSION) -t powerdns/dnsdist-master:$(VERSION)-$(REVISION) --rm -f Dockerfile-dnsdist .
+build: auth recursor dnsdist
+ @true
+
build-nocache:
docker build --build-arg VERSION=$(VERSION) -t powerdns/pdns-auth-master:$(VERSION)-$(REVISION) --no-cache --rm -f Dockerfile-auth .
docker build --build-arg VERSION=$(VERSION) -t powerdns/pdns-recursor-master:$(VERSION)-$(REVISION) --no-cache --rm -f Dockerfile-recursor .