Skip to content

Commit

Permalink
install protoc for docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Sep 12, 2024
1 parent a883b60 commit 25ce1ed
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ci/release/hermes.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@
FROM rust:1-buster AS build-env

ARG TAG
ARG PROTOC_VERSION=28.1

WORKDIR /root

COPY . .

# Install protoc
RUN ARCH=$(uname -m) && OS=$(uname -s) && \
if [ "$OS" = "Linux" ] && [ "$ARCH" = "x86_64" ]; then \
PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip; \
elif [ "$OS" = "Linux" ] && [ "$ARCH" = "aarch64" ]; then \
PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-aarch_64.zip; \
else \
echo "Unsupported OS/architecture: $OS-$ARCH"; exit 1; \
fi && \
wget https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP -O /tmp/protoc.zip && \
unzip /tmp/protoc.zip -d /usr/local && \
rm -rf /tmp/protoc.zip
RUN cargo build --release

FROM ubuntu:latest
Expand Down

0 comments on commit 25ce1ed

Please sign in to comment.