From eef863554a1e9011dafdf21a4b5c78ac7c879e6c Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Sat, 16 Nov 2024 07:44:52 +0000 Subject: [PATCH] ci: install `i386` packages only if host is `amd64`, merge layers --- contrib/containers/ci/Dockerfile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/contrib/containers/ci/Dockerfile b/contrib/containers/ci/Dockerfile index c5f47397a1a2c..69da54c93e349 100644 --- a/contrib/containers/ci/Dockerfile +++ b/contrib/containers/ci/Dockerfile @@ -7,13 +7,17 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" # (zlib1g-dev is needed for the Qt host binary builds, but should not be used by target binaries) ENV APT_ARGS="-y --no-install-recommends --no-upgrade" -# Install packages for i386; disabled on aarch64 and arm64 hosts -RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || dpkg --add-architecture i386) -RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || (apt-get update && apt-get install $APT_ARGS \ - g++-multilib \ - wine32) && rm -rf /var/lib/apt/lists/*) - -RUN apt-get update && apt-get install $APT_ARGS \ +# Install packages for i386 on amd64 hosts, then install common packages +RUN set -ex; \ + apt-get update && \ + if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ + dpkg --add-architecture i386 && \ + apt-get update && \ + apt-get install $APT_ARGS \ + g++-multilib \ + wine32; \ + fi; \ + apt-get install $APT_ARGS \ autotools-dev \ automake \ autoconf \