]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - Dockerfile-recursor
Merge pull request #14195 from rgacogne/ddist-no-assertions
[thirdparty/pdns.git] / Dockerfile-recursor
index e26fb31343f8bb4f06b53ce49b69e02969f23eae..40c2847118bc4fe211e3ef253234bf8fa3d9a5dc 100644 (file)
@@ -5,7 +5,7 @@
 #   dig a www.example.com @0 -p 1053
 
 # Builder
-FROM debian:10-slim AS builder
+FROM debian:11-slim AS builder
 
 ENV NO_LUA_JIT="s390x arm64"
 
@@ -13,7 +13,7 @@ ENV NO_LUA_JIT="s390x arm64"
 RUN apt-get update && apt-get -y dist-upgrade && apt-get clean
 
 # 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
+RUN apt-get install -y --no-install-recommends devscripts equivs git curl jq && apt-get clean
 
 COPY builder-support /source/builder-support
 
@@ -28,6 +28,10 @@ COPY ext /source/ext
 COPY .git /source/.git
 COPY builder/helpers/set-configure-ac-version.sh /usr/local/bin
 
+COPY builder-support/helpers/install_rust.sh /source/install_rust.sh
+COPY builder-support/helpers/rust.json /source/rust.json
+RUN cd /source/ && ./install_rust.sh
+
 # build and install (TODO: before we hit this line, rearrange /source structure if we are coming from a tarball)
 WORKDIR /source/pdns/recursordist
 
@@ -50,6 +54,7 @@ RUN if [ "${DOCKER_FAKE_RELEASE}" = "YES" ]; then \
 
 RUN mkdir /build && \
     LUAVER=$([ -z "${NO_LUA_JIT##*$(dpkg --print-architecture)*}" ] && echo 'lua5.3' || echo 'luajit') && \
+    apt-get install -y lib${LUAVER}-*dev && \
     ./configure \
       --with-lua=${LUAVER} \
       LDFLAGS=-rdynamic \
@@ -66,7 +71,7 @@ RUN cd /tmp && mkdir /build/tmp/ && mkdir debian && \
     dpkg-deb -I equivs-dummy_1.0_all.deb && cp equivs-dummy_1.0_all.deb /build/tmp/
 
 # Runtime
-FROM debian:10-slim
+FROM debian:11-slim
 
 # Reusable layer for base update - Should be cached from builder
 RUN apt-get update && apt-get -y dist-upgrade && apt-get clean
@@ -77,7 +82,6 @@ RUN apt-get install -y python3 python3-jinja2 tini libcap2-bin && apt-get clean
 # Executables from builder
 COPY --from=builder /build /
 RUN chmod 1777 /tmp # FIXME: better not use /build/tmp for equivs at all
-RUN setcap 'cap_net_bind_service=+eip' /usr/local/sbin/pdns_recursor
 
 # Ensure dependencies are present
 RUN apt-get install -y /tmp/equivs-dummy_1.0_all.deb && apt-get clean
@@ -96,11 +100,11 @@ RUN adduser --system --disabled-password --disabled-login --no-create-home --gro
 RUN chown pdns:pdns /var/run/pdns-recursor /etc/powerdns/recursor.d /etc/powerdns/templates.d
 USER pdns
 
-# DNS ports
+# Default DNS ports
 EXPOSE 53/udp
 EXPOSE 53/tcp
 
-# webserver port
+# Default webserver port
 EXPOSE 8082/tcp
 
 ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/sbin/pdns_recursor-startup"]