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 \