summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/opentelemetry-cpp/docker/Dockerfile.centos
blob: 66138ba60ac5e9efa1381e5c6913213d75395839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
FROM centos:7

ARG TOOLSET_VER=11

RUN yum update -y && yum install -y centos-release-scl epel-release
RUN yum install -y devtoolset-${TOOLSET_VER} \
    cmake3 git \
    openssl-devel \
    libcurl-devel \
    && source /opt/rh/devtoolset-${TOOLSET_VER}/enable

RUN echo "source /opt/rh/devtoolset-${TOOLSET_VER}/enable" >> /etc/bashrc
RUN echo "BOOST_LIBRARYDIR=/usr/lib64/boost169" >> /etc/bashrc
RUN echo "BOOST_INCLUDEDIR=/usr/include/boost169" >> /etc/bashrc

ARG GRPC_VERSION=v1.43.2

# install gRPC
RUN git clone --depth=1 -b $GRPC_VERSION  https://github.com/grpc/grpc.git \
    && cd grpc && git submodule update --init \
    && mkdir -p "third_party/abseil-cpp/build" && cd "third_party/abseil-cpp/build" \
    && source /opt/rh/devtoolset-${TOOLSET_VER}/enable \
    && cmake3 -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE .. \
    && make -j${nproc} install && cd ../../.. \
    && mkdir build && cd build \
    && cmake3 \
        -DCMAKE_CXX_STANDARD=17 \
        -DCMAKE_BUILD_TYPE=Release \
        -DgRPC_INSTALL=ON \
        -DgRPC_BUILD_TESTS=OFF \
        -DgRPC_ABSL_PROVIDER=package \
        -DgRPC_SSL_PROVIDER=package \
        .. && \
    make -j${nproc} install && make clean && ldconfig

# install thrift
ARG THRIFT_VERSION=0.14.1
RUN yum install -y \
        boost169-devel \
        libevent-devel \
        wget \
    && wget https://github.com/apache/thrift/archive/refs/tags/v$THRIFT_VERSION.tar.gz \
    && tar -xvf v$THRIFT_VERSION.tar.gz \
    && mkdir -p thrift-$THRIFT_VERSION/build && cd thrift-$THRIFT_VERSION/build \
    && source /opt/rh/devtoolset-${TOOLSET_VER}/enable \
    && export BOOST_INCLUDEDIR=/usr/include/boost169 \
    && export BOOST_LIBRARYDIR=/usr/lib64/boost169 \
    && cmake3 \
        -DCMAKE_BUILD_TYPE=Release \
        -DBUILD_COMPILER=OFF \
        -DBUILD_CPP=ON \
        -DBUILD_LIBRARIES=ON \
        -DBUILD_NODEJS=OFF \
        -DBUILD_PYTHON=OFF \
        -DBUILD_JAVASCRIPT=OFF \
        -DBUILD_C_GLIB=OFF \
        -DBUILD_JAVA=OFF \
        -DBUILD_TESTING=OFF \
        -DBUILD_TUTORIALS=OFF \
        -DWITH_STDTHREADS=ON \
        -DWITH_BOOSTTHREADS=OFF \
        -DWITH_BOOST_FUNCTIONAL=OFF \
        -DWITH_BOOST_SMART_PTR=OFF \
        .. \
    && make -j${nproc} && make install && ldconfig

#install opentelemetry-cpp
RUN git clone --depth=1 https://github.com/open-telemetry/opentelemetry-cpp.git \
    && cd opentelemetry-cpp && git submodule update --init \
    && mkdir -p build && cd build \
    && source /opt/rh/devtoolset-${TOOLSET_VER}/enable \
    && export BOOST_INCLUDEDIR=/usr/include/boost169 \
    && export BOOST_LIBRARYDIR=/usr/lib64/boost169 \
    && cmake3 \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE  \
        -DWITH_ZIPKIN=ON \
        -DWITH_JAEGER=ON \
        -DBUILD_TESTING=OFF \
        -DWITH_OTLP=ON \
        .. \
    && make -j${nproc} install && ldconfig