Skip to content

Commit 1c15d13

Browse files
authored
GH-32994: [Dev][Archery] Fix multi-arch Docker configuration (#50125)
### Rationale for this change Our Archery docker setup had support for running foreign-arch containers (for example a ARM64 container on a x86-64 native host, using emulation), but it failed working at some point. ### Are these changes tested? By existing CI runs, as well as locally (by running a couple ARM64 containers on a x86-64 native host). ### Are there any user-facing changes? No. * GitHub Issue: #32994 Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent 8de83d4 commit 1c15d13

36 files changed

Lines changed: 238 additions & 200 deletions

.github/workflows/cpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
runs-on: ubuntu-latest
9797
title: AMD64 Ubuntu 24.04 C++ ASAN UBSAN
9898
ubuntu: 24.04
99-
- arch: arm64v8
99+
- arch: arm64/v8
100100
clang-tools: 18
101101
image: ubuntu-cpp
102102
llvm: 18

.github/workflows/cpp_extra.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ jobs:
221221
platform:
222222
- arch: "amd64"
223223
runs-on: ubuntu-latest
224-
- arch: "arm64v8"
224+
- arch: "arm64/v8"
225225
runs-on: ubuntu-24.04-arm
226226
env:
227227
ARCH: ${{ matrix.platform.arch }}
@@ -584,7 +584,7 @@ jobs:
584584
ARROW_BUILD_STATIC: OFF
585585
ARROW_BUILD_TESTS: ON
586586
ARROW_BUILD_TYPE: release
587-
# Turn Arrow CSV off to disable `find_package(Arrow)` check on MSVC CI.
587+
# Turn Arrow CSV off to disable `find_package(Arrow)` check on MSVC CI.
588588
# GH-49050 TODO: enable `find_package(Arrow)` check on MSVC CI.
589589
ARROW_CSV: OFF
590590
ARROW_DEPENDENCY_SOURCE: VCPKG

.hadolint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ ignored:
2222
- DL3018
2323
- DL3028 # Ruby gem version pinning
2424
- DL3007 # r-sanitizer must use latest
25+
- DL3029 # Do not use --platform flag with FROM
2526
- DL3041 # Specify version with `dnf install -y <package>-<version>`.

ci/docker/almalinux-10-verify-rc.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
ARG arch=amd64
19-
FROM ${arch}/almalinux:10
19+
FROM --platform=linux/${arch} almalinux:10
2020

2121
COPY dev/release/setup-rhel-rebuilds.sh /
2222
RUN /setup-rhel-rebuilds.sh && \

ci/docker/almalinux-8-verify-rc.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
ARG arch=amd64
19-
FROM ${arch}/almalinux:8
19+
FROM --platform=linux/${arch} almalinux:8
2020

2121
COPY dev/release/setup-rhel-rebuilds.sh /
2222
RUN /setup-rhel-rebuilds.sh && \

ci/docker/alpine-linux-3.22-cpp.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
ARG arch=amd64
19-
FROM ${arch}/alpine:3.22
19+
FROM --platform=linux/${arch} alpine:3.22
2020

2121
RUN apk add \
2222
apache-orc-dev \

ci/docker/alpine-linux-3.22-r.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Replicates CRAN's Alpine environment as closely as possible
2121

2222
ARG arch=amd64
23-
FROM ${arch}/alpine:3.22
23+
FROM --platform=linux/${arch} alpine:3.22
2424

2525
# Install R and essential build tools
2626
# Note: bash is needed for Arrow CI scripts, even though CRAN's Alpine uses BusyBox

ci/docker/conda-cpp.dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
ARG repo
1919
ARG arch
20-
FROM ${repo}:${arch}-conda
20+
ARG arch_short
21+
FROM --platform=linux/${arch} ${repo}:${arch_short}-conda
2122

2223
COPY ci/scripts/install_minio.sh /arrow/ci/scripts
2324
RUN /arrow/ci/scripts/install_minio.sh latest /opt/conda

ci/docker/conda-integration.dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
# under the License.
1717

1818
ARG repo
19-
ARG arch=amd64
20-
FROM ${repo}:${arch}-conda-cpp
19+
ARG arch
20+
ARG arch_short
21+
FROM --platform=linux/${arch} ${repo}:${arch_short}-conda-cpp
2122

22-
ARG arch=amd64
2323
# We need to synchronize the following values with the values in .env
2424
# and services.conda-integration in compose.yaml.
2525
ARG maven=3.9.9

ci/docker/conda-python-dask.dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
# under the License.
1717

1818
ARG repo
19-
ARG arch=amd64
19+
ARG arch
20+
ARG arch_short
2021
ARG python=3.10
21-
FROM ${repo}:${arch}-conda-python-${python}
22+
FROM --platform=linux/${arch} ${repo}:${arch_short}-conda-python-${python}
2223

2324
ARG dask=latest
2425
COPY ci/scripts/install_dask.sh /arrow/ci/scripts/

0 commit comments

Comments
 (0)