Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 773359a

Browse files
committed
Dockerfile: switch to iptables-legacy to match the host
CI runs on Ubuntu 16.04 machines, which use iptables (legacy), but Debian buster uses nftables. Because of this, DNS resolution does not work if the daemon configures iptables. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit bb0472bd23806327a1ff1ea87343a6a0cadc21e9) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 68db0c173965da830140fc273fb98feb00cda031 Component: engine
1 parent 3b64f62 commit 773359a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

components/engine/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
281281
zip \
282282
&& rm -rf /var/lib/apt/lists/*
283283

284+
# Switch to use iptables instead of nftables (to match the host machine)
285+
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy || true \
286+
&& update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy || true \
287+
&& update-alternatives --set arptables /usr/sbin/arptables-legacy || true
288+
284289
RUN pip3 install yamllint==1.16.0
285290

286291
COPY --from=dockercli /build/ /usr/local/cli

0 commit comments

Comments
 (0)