Skip to content

Commit eef8635

Browse files
committed
ci: install i386 packages only if host is amd64, merge layers
1 parent e770229 commit eef8635

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

contrib/containers/ci/Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
77
# (zlib1g-dev is needed for the Qt host binary builds, but should not be used by target binaries)
88
ENV APT_ARGS="-y --no-install-recommends --no-upgrade"
99

10-
# Install packages for i386; disabled on aarch64 and arm64 hosts
11-
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || dpkg --add-architecture i386)
12-
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || (apt-get update && apt-get install $APT_ARGS \
13-
g++-multilib \
14-
wine32) && rm -rf /var/lib/apt/lists/*)
15-
16-
RUN apt-get update && apt-get install $APT_ARGS \
10+
# Install packages for i386 on amd64 hosts, then install common packages
11+
RUN set -ex; \
12+
apt-get update && \
13+
if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
14+
dpkg --add-architecture i386 && \
15+
apt-get update && \
16+
apt-get install $APT_ARGS \
17+
g++-multilib \
18+
wine32; \
19+
fi; \
20+
apt-get install $APT_ARGS \
1721
autotools-dev \
1822
automake \
1923
autoconf \

0 commit comments

Comments
 (0)