Skip to content

Commit ece3470

Browse files
committed
improve caching & fix auth build
Signed-off-by: MatsG23 <60609373+MatsG23@users.noreply.github.com>
1 parent 5f14bfa commit ece3470

3 files changed

Lines changed: 21 additions & 22 deletions

File tree

Dockerfile-auth

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ RUN apt-get install -y --no-install-recommends \
1414
git \
1515
python3-venv
1616

17-
# Install Lua
18-
ARG NO_LUA_JIT="s390x arm64"
19-
RUN LUAVER=$([ -z "${NO_LUA_JIT##*$(dpkg --print-architecture)*}" ] && echo 'lua5.3' || echo 'luajit') && \
20-
apt-get install -y --no-install-recommends lib${LUAVER}-*dev && \
21-
apt-get clean
22-
2317
# TODO: make sure /source looks roughly the same from git or tar
2418
WORKDIR /source
2519

@@ -28,7 +22,7 @@ COPY builder-support/ builder-support/
2822

2923
# TODO: control file is not in tarballs at all right now
3024
RUN mk-build-deps -i -t 'apt-get -o Debug::pkgProblemResolver=yes -y --no-install-recommends' builder-support/debian/authoritative/debian-buster/control && \
31-
apt-get clean && rm -rf /var/lib/apt/lists/*
25+
apt-get clean
3226

3327
# build and install
3428

@@ -51,8 +45,13 @@ RUN if [ "${DOCKER_FAKE_RELEASE}" = "YES" ]; then \
5145
fi && \
5246
BUILDER_MODULES=authoritative autoreconf -vfi
5347

48+
# Lua install merged with build because Make seems to need the Lua installation name
5449
# TODO: simplify repeated -C calls with SUBDIRS?
55-
RUN mkdir /build && \
50+
ARG NO_LUA_JIT="s390x arm64"
51+
RUN LUAVER=$([ -z "${NO_LUA_JIT##*$(dpkg --print-architecture)*}" ] && echo 'lua5.3' || echo 'luajit') && \
52+
apt-get install -y --no-install-recommends lib${LUAVER}-*dev && \
53+
apt-get clean && rm -rf /var/lib/apt/lists/* && \
54+
mkdir /build && \
5655
./configure \
5756
--with-lua=${LUAVER} \
5857
--sysconfdir=/etc/powerdns \

Dockerfile-dnsdist

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ RUN apt-get install -y --no-install-recommends \
1818
meson \
1919
ninja-build
2020

21-
# Install Lua
22-
ARG NO_LUA_JIT="s390x arm64"
23-
RUN LUAVER=$([ -z "${NO_LUA_JIT##*$(dpkg --print-architecture)*}" ] && echo 'lua5.3' || echo 'luajit') && \
24-
apt-get install -y --no-install-recommends lib${LUAVER}-*dev && \
25-
apt-get clean
26-
2721
# TODO: make sure /source looks roughly the same from git or tar
2822
WORKDIR /source
2923

@@ -32,7 +26,7 @@ COPY builder-support/ builder-support/
3226

3327
# TODO: control file is not in tarballs at all right now
3428
RUN mk-build-deps -i -t 'apt-get -o Debug::pkgProblemResolver=yes -y --no-install-recommends' builder-support/debian/dnsdist/debian-bookworm/control && \
35-
apt-get clean && rm -rf /var/lib/apt/lists/*
29+
apt-get clean
3630

3731
WORKDIR /source/builder-support/helpers/
3832
RUN ./install_rust.sh && \
@@ -53,6 +47,12 @@ WORKDIR /source/pdns/dnsdistdist
5347
# avoid installing pandoc and venv
5448
RUN touch dnsdist.1
5549

50+
# Install Lua
51+
ARG NO_LUA_JIT="s390x arm64"
52+
RUN LUAVER=$([ -z "${NO_LUA_JIT##*$(dpkg --print-architecture)*}" ] && echo 'lua5.3' || echo 'luajit') && \
53+
apt-get install -y --no-install-recommends lib${LUAVER}-*dev && \
54+
apt-get clean && rm -rf /var/lib/apt/lists/*
55+
5656
RUN mkdir /build && \
5757
BUILDDIR=$(mktemp -d) && \
5858
IS_RELEASE="${DOCKER_FAKE_RELEASE}" \

Dockerfile-recursor

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ RUN apt-get install -y --no-install-recommends \
2222
meson \
2323
ninja-build
2424

25-
# Install Lua
26-
ARG NO_LUA_JIT="s390x"
27-
RUN LUAVER=$([ -z "${NO_LUA_JIT##*$(dpkg --print-architecture)*}" ] && echo 'lua5.3' || echo 'luajit') && \
28-
apt-get install -y --no-install-recommends lib${LUAVER}-*dev && \
29-
apt-get clean
30-
3125
# TODO: make sure /source looks roughly the same from git or tar
3226
WORKDIR /source
3327

@@ -36,7 +30,7 @@ COPY builder-support/ builder-support/
3630

3731
# TODO: control file is not in tarballs at all right now
3832
RUN mk-build-deps -i -t 'apt-get -o Debug::pkgProblemResolver=yes -y --no-install-recommends' builder-support/debian/recursor/debian-buster/control && \
39-
apt-get clean && rm -rf /var/lib/apt/lists/*
33+
apt-get clean
4034

4135
# Install Rust
4236
COPY builder-support/helpers/install_rust.sh install_rust.sh
@@ -58,6 +52,12 @@ WORKDIR /source/pdns/recursordist
5852
# avoid installing pandoc
5953
RUN touch pdns_recursor.1 rec_control.1
6054

55+
# Install Lua
56+
ARG NO_LUA_JIT="s390x"
57+
RUN LUAVER=$([ -z "${NO_LUA_JIT##*$(dpkg --print-architecture)*}" ] && echo 'lua5.3' || echo 'luajit') && \
58+
apt-get install -y --no-install-recommends lib${LUAVER}-*dev && \
59+
apt-get clean && rm -rf /var/lib/apt/lists/*
60+
6161
RUN mkdir /build && \
6262
BUILDDIR=$(mktemp -d) && \
6363
IS_RELEASE="${DOCKER_FAKE_RELEASE}" \

0 commit comments

Comments
 (0)