From ec17d6c56e068bc82dc26355e16cdbab88f5b3ed Mon Sep 17 00:00:00 2001 From: Bob Bai Date: Mon, 8 Jun 2026 15:47:10 -0700 Subject: [PATCH] fix(build): download protoc matching target arch in images The three service Dockerfiles always fetched the linux-x86_64 protoc release, so the build-time proto regeneration failed on ARM64 image builds (protoc: No such file or directory, exit 127). Select the protoc asset (x86_64 / aarch_64) from $(uname -m) so all target platforms build. --- bin/computing-unit-master.dockerfile | 7 ++++++- bin/computing-unit-worker.dockerfile | 7 ++++++- bin/texera-web-application.dockerfile | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/bin/computing-unit-master.dockerfile b/bin/computing-unit-master.dockerfile index aece464438d..12d026ee543 100644 --- a/bin/computing-unit-master.dockerfile +++ b/bin/computing-unit-master.dockerfile @@ -55,7 +55,12 @@ RUN apt-get update && apt-get install -y \ COPY bin/protoc-version.txt bin/protoc-version.txt COPY bin/python-proto-gen.sh bin/python-proto-gen.sh RUN PROTOC_VERSION=$(cat bin/protoc-version.txt) \ - && curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" \ + && case "$(uname -m)" in \ + x86_64 | amd64) PROTOC_ARCH=x86_64 ;; \ + aarch64 | arm64) PROTOC_ARCH=aarch_64 ;; \ + *) echo "Unsupported architecture: $(uname -m)" >&2 && exit 1 ;; \ + esac \ + && curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip" \ && unzip -o /tmp/protoc.zip -d /usr/local \ && chmod +x /usr/local/bin/protoc \ && rm /tmp/protoc.zip \ diff --git a/bin/computing-unit-worker.dockerfile b/bin/computing-unit-worker.dockerfile index fc80998888f..fc89c0f352d 100644 --- a/bin/computing-unit-worker.dockerfile +++ b/bin/computing-unit-worker.dockerfile @@ -55,7 +55,12 @@ RUN apt-get update && apt-get install -y \ COPY bin/protoc-version.txt bin/protoc-version.txt COPY bin/python-proto-gen.sh bin/python-proto-gen.sh RUN PROTOC_VERSION=$(cat bin/protoc-version.txt) \ - && curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" \ + && case "$(uname -m)" in \ + x86_64 | amd64) PROTOC_ARCH=x86_64 ;; \ + aarch64 | arm64) PROTOC_ARCH=aarch_64 ;; \ + *) echo "Unsupported architecture: $(uname -m)" >&2 && exit 1 ;; \ + esac \ + && curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip" \ && unzip -o /tmp/protoc.zip -d /usr/local \ && chmod +x /usr/local/bin/protoc \ && rm /tmp/protoc.zip \ diff --git a/bin/texera-web-application.dockerfile b/bin/texera-web-application.dockerfile index efaee5699a8..276253ec4fa 100644 --- a/bin/texera-web-application.dockerfile +++ b/bin/texera-web-application.dockerfile @@ -70,7 +70,12 @@ RUN apt-get update && apt-get install -y \ COPY bin/protoc-version.txt bin/protoc-version.txt COPY bin/python-proto-gen.sh bin/python-proto-gen.sh RUN PROTOC_VERSION=$(cat bin/protoc-version.txt) \ - && curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" \ + && case "$(uname -m)" in \ + x86_64 | amd64) PROTOC_ARCH=x86_64 ;; \ + aarch64 | arm64) PROTOC_ARCH=aarch_64 ;; \ + *) echo "Unsupported architecture: $(uname -m)" >&2 && exit 1 ;; \ + esac \ + && curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip" \ && unzip -o /tmp/protoc.zip -d /usr/local \ && chmod +x /usr/local/bin/protoc \ && rm /tmp/protoc.zip \