File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,10 +15,16 @@ FROM python:3.9
1515# Set working directory
1616WORKDIR /workspace
1717
18- ENV PROTOC_ZIP=protoc-29.3-linux-aarch_64.zip
19-
20- RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v29.3/$PROTOC_ZIP
21- RUN unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
18+ ENV PROTOC_VERSION=29.3
19+ RUN ARCH=$(uname -m) && \
20+ case "$ARCH" in \
21+ x86_64) PROTOC_ARCH="x86_64" ;; \
22+ arm64|aarch64) PROTOC_ARCH="aarch_64" ;; \
23+ *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
24+ esac && \
25+ curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip && \
26+ unzip -o protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip -d /usr/local && \
27+ rm protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip
2228
2329# Copy installed Go deps from previous build step
2430COPY --from=0 /go /go
You can’t perform that action at this time.
0 commit comments