11FROM centos:7
22
3+ ARG TOOLSET_VER=11
4+
35RUN yum update -y && yum install -y centos-release-scl epel-release
4- RUN yum install -y devtoolset-11 \
6+ RUN yum install -y devtoolset-${TOOLSET_VER} \
57 cmake3 git \
68 openssl-devel \
79 libcurl-devel \
8- && source /opt/rh/devtoolset-11 /enable
10+ && source /opt/rh/devtoolset-${TOOLSET_VER} /enable
911
10- RUN echo "source /opt/rh/devtoolset-11 /enable" >> /etc/bashrc
12+ RUN echo "source /opt/rh/devtoolset-${TOOLSET_VER} /enable" >> /etc/bashrc
1113RUN echo "BOOST_LIBRARYDIR=/usr/lib64/boost169" >> /etc/bashrc
1214RUN echo "BOOST_INCLUDEDIR=/usr/include/boost169" >> /etc/bashrc
1315
@@ -17,7 +19,7 @@ ARG GRPC_VERSION=v1.43.2
1719RUN git clone --depth=1 -b $GRPC_VERSION https://github.com/grpc/grpc.git \
1820 && cd grpc && git submodule update --init \
1921 && mkdir -p "third_party/abseil-cpp/build" && cd "third_party/abseil-cpp/build" \
20- && source /opt/rh/devtoolset-11 /enable \
22+ && source /opt/rh/devtoolset-${TOOLSET_VER} /enable \
2123 && cmake3 -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE .. \
2224 && make -j${nproc} install && cd ../../.. \
2325 && mkdir build && cd build \
@@ -40,7 +42,7 @@ RUN yum install -y \
4042 && wget https://github.com/apache/thrift/archive/refs/tags/v$THRIFT_VERSION.tar.gz \
4143 && tar -xvf v$THRIFT_VERSION.tar.gz \
4244 && mkdir -p thrift-$THRIFT_VERSION/build && cd thrift-$THRIFT_VERSION/build \
43- && source /opt/rh/devtoolset-11 /enable \
45+ && source /opt/rh/devtoolset-${TOOLSET_VER} /enable \
4446 && export BOOST_INCLUDEDIR=/usr/include/boost169 \
4547 && export BOOST_LIBRARYDIR=/usr/lib64/boost169 \
4648 && cmake3 \
@@ -66,7 +68,7 @@ RUN yum install -y \
6668RUN git clone --depth=1 https://github.com/open-telemetry/opentelemetry-cpp.git \
6769 && cd opentelemetry-cpp && git submodule update --init \
6870 && mkdir -p build && cd build \
69- && source /opt/rh/devtoolset-11 /enable \
71+ && source /opt/rh/devtoolset-${TOOLSET_VER} /enable \
7072 && export BOOST_INCLUDEDIR=/usr/include/boost169 \
7173 && export BOOST_LIBRARYDIR=/usr/lib64/boost169 \
7274 && cmake3 \
0 commit comments