diff --git a/el7/Dockerfile b/el7/Dockerfile index d5922ba..196ceba 100644 --- a/el7/Dockerfile +++ b/el7/Dockerfile @@ -40,6 +40,10 @@ RUN yum groupinstall -y "Development Tools" && \ ADD install-openssl11.sh get-git.sh get-automake.sh get-cmake.sh / +COPY el9/get-protoc.sh /get-protoc.sh + +RUN /get-protoc.sh + WORKDIR / # We need git >= 2.18 otherwise actions/checkout@v3 in github diff --git a/el7/get-protoc.sh b/el7/get-protoc.sh new file mode 100755 index 0000000..ad7fe25 --- /dev/null +++ b/el7/get-protoc.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -euo pipefail + +cd /tmp + +PB_REL="https://github.com/protocolbuffers/protobuf/releases" +VSN="33.1" + +case $(uname -m) in + x86_64) + ARCH="x86_64" + ;; + *) + ARCH="aarch_64" + ;; +esac + +curl -LO "$PB_REL/download/v$VSN/protoc-$VSN-linux-$ARCH.zip" +# zip contains `bin/protoc` +unzip "protoc-$VSN-linux-$ARCH.zip" -d /usr/local/ diff --git a/el9/get-protoc.sh b/el9/get-protoc.sh index 4181b80..ad7fe25 100755 --- a/el9/get-protoc.sh +++ b/el9/get-protoc.sh @@ -17,4 +17,5 @@ case $(uname -m) in esac curl -LO "$PB_REL/download/v$VSN/protoc-$VSN-linux-$ARCH.zip" -unzip "protoc-$VSN-linux-$ARCH.zip" -d /usr/local/bin +# zip contains `bin/protoc` +unzip "protoc-$VSN-linux-$ARCH.zip" -d /usr/local/