Skip to content

Commit ab3b8ca

Browse files
authored
Merge pull request #148 from emqx/20251205-fix-el9-protoc
fix(el9): use `get-protoc.sh` script
2 parents c9c978e + e0cf707 commit ab3b8ca

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

el9/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ RUN dnf -y install \
1010
perl-FindBin \
1111
python3-pip \
1212
procps-ng \
13-
protobuf-compiler \
1413
systemd \
1514
vim \
1615
wget \
@@ -31,6 +30,10 @@ RUN dnf -y install \
3130

3231
RUN ln -s /usr/bin/python3 /usr/bin/python
3332

33+
COPY el9/get-protoc.sh /get-protoc.sh
34+
35+
RUN /get-protoc.sh
36+
3437
WORKDIR /
3538

3639
COPY get-cmake.sh /get-cmake.sh

el9/get-protoc.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
unzip "protoc-$VSN-linux-$ARCH.zip" -d /usr/local/bin

0 commit comments

Comments
 (0)