Skip to content

Commit c534fd9

Browse files
committed
chore(el7): add script to get protobuf compiler
1 parent d164643 commit c534fd9

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

el7/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ RUN yum groupinstall -y "Development Tools" && \
4040

4141
ADD install-openssl11.sh get-git.sh get-automake.sh get-cmake.sh /
4242

43+
COPY el9/get-protoc.sh /get-protoc.sh
44+
45+
RUN /get-protoc.sh
46+
4347
WORKDIR /
4448

4549
# We need git >= 2.18 otherwise actions/checkout@v3 in github

el7/get-protoc.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
cd /tmp
6+
7+
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
8+
VSN="33.1"
9+
10+
case $(uname -m) in
11+
x86_64)
12+
ARCH="x86_64"
13+
;;
14+
*)
15+
ARCH="aarch_64"
16+
;;
17+
esac
18+
19+
curl -LO "$PB_REL/download/v$VSN/protoc-$VSN-linux-$ARCH.zip"
20+
# zip contains `bin/protoc`
21+
unzip "protoc-$VSN-linux-$ARCH.zip" -d /usr/local/

0 commit comments

Comments
 (0)