Skip to content

Commit

Permalink
Change the way of installin protoc
Browse files Browse the repository at this point in the history
  • Loading branch information
MRamanenkau committed Jul 6, 2023
1 parent 4c6e666 commit f674867
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ COPY . /cerenetwork

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y cmake pkg-config libssl-dev git clang protobuf-compiler build-essential
apt-get install -y cmake pkg-config libssl-dev git clang

# Installation script is taken from https://grpc.io/docs/protoc-installation/
RUN PB_REL="https://github.com/protocolbuffers/protobuf/releases" && \
curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip && \
apt-get install -y unzip && \
unzip protoc-3.15.8-linux-x86_64.zip -d $HOME/.local && \
export PATH="$PATH:$HOME/.local/bin" && \
export PROTOC=/usr/bin/protoc

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
export PATH=$PATH:$HOME/.cargo/bin && \
scripts/init.sh && \
Expand Down
11 changes: 10 additions & 1 deletion Dockerfile.tests
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ COPY --from=ddc-smart-contract /ddc-smart-contract/artifacts/metadata.json /cere

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y cmake pkg-config libssl-dev git clang protobuf-compiler build-essential
apt-get install -y cmake pkg-config libssl-dev git clang

# Installation script is taken from https://grpc.io/docs/protoc-installation/
RUN PB_REL="https://github.com/protocolbuffers/protobuf/releases" && \
curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip && \
apt-get install -y unzip && \
unzip protoc-3.15.8-linux-x86_64.zip -d $HOME/.local && \
export PATH="$PATH:$HOME/.local/bin" && \
export PROTOC=/usr/bin/protoc

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
export PATH=$PATH:$HOME/.cargo/bin && \
scripts/init.sh && \
Expand Down

0 comments on commit f674867

Please sign in to comment.