diff --git a/bazel/oci/Dockerfile b/bazel/oci/Dockerfile index f99995a356..036f9de70c 100644 --- a/bazel/oci/Dockerfile +++ b/bazel/oci/Dockerfile @@ -8,7 +8,7 @@ RUN --mount=source=bazel/oci/install_packages.sh,target=/mnt/install_packages.sh FROM base_image AS downloader -ARG BAZEL_VERSION +ARG TARGETARCH BAZEL_VERSION WORKDIR /var/bazel RUN --mount=source=bazel/oci/install_bazel.sh,target=/mnt/install_bazel.sh,type=bind \ diff --git a/bazel/oci/install_bazel.sh b/bazel/oci/install_bazel.sh index c2e1ba400c..f5b0e47671 100755 --- a/bazel/oci/install_bazel.sh +++ b/bazel/oci/install_bazel.sh @@ -6,13 +6,13 @@ curl \ --fail \ --location \ --remote-name \ - "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64" + "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-${TARGETARCH}" curl \ --fail \ --location \ - "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64.sha256" \ + "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-${TARGETARCH}.sha256" \ | sha256sum --check -mv "bazel-${BAZEL_VERSION}-linux-x86_64" bazel +mv "bazel-${BAZEL_VERSION}-linux-${TARGETARCH}" bazel chmod +x bazel