File tree Expand file tree Collapse file tree 1 file changed +4
-25
lines changed
Expand file tree Collapse file tree 1 file changed +4
-25
lines changed Original file line number Diff line number Diff line change @@ -28,33 +28,17 @@ RUN dnf -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install \
2828 cmake ninja-build \
2929 gcc gcc-c++ \
3030 \
31- protobuf-devel \
32- grpc-devel grpc-plugins \
33- c-ares-devel \
34- re2-devel \
35- \
3631 cyrus-sasl-devel \
3732 openssl-devel \
3833 python-devel
3934
40- # Build opentelemetry-cpp from source
41- ENV OTEL_VERSION=v1.16.1
42- RUN git clone --branch=${OTEL_VERSION} --depth=1 --recurse-submodules --shallow-submodules https://github.com/open-telemetry/opentelemetry-cpp.git && \
43- cmake -S opentelemetry-cpp -B cmake-build-opentelemetry -GNinja \
44- -DCMAKE_INSTALL_PREFIX=/usr/local \
45- -DCMAKE_BUILD_TYPE=Release \
46- -DBUILD_TESTING=OFF \
47- -DWITH_EXAMPLES=OFF \
48- -DWITH_OTLP_GRPC=ON \
49- -DWITH_OTLP_HTTP=ON \
50- -DWITH_ZPAGES=ON && \
51- cmake --build cmake-build-opentelemetry && \
52- cmake --install cmake-build-opentelemetry && \
53- rm -rf opentelemetry-cpp cmake-build-opentelemetry
54-
5535COPY . /src
5636WORKDIR /src
5737
38+ # Patch CMakeLists.txt to make opentelemetry-cpp optional
39+ RUN sed -i 's/find_package(opentelemetry-cpp REQUIRED)/find_package(opentelemetry-cpp QUIET)/' src/api/qpid-proton/CMakeLists.txt && \
40+ sed -i '/find_package(opentelemetry-cpp QUIET)/a\ if(NOT opentelemetry-cpp_FOUND)\n set(OPENTELEMETRY_ENABLED OFF)\n endif()' src/api/qpid-proton/CMakeLists.txt
41+
5842# can't put $(arch) to CCACHE_DIR, https://github.com/moby/moby/issues/29110
5943# ENV CCACHE_DIR=
6044ENV CCACHE_COMPRESS=true
@@ -94,14 +78,9 @@ RUN dnf install -y 'dnf-command(config-manager)'
9478RUN /usr/bin/crb enable
9579
9680RUN dnf -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install \
97- protobuf \
98- grpc \
99- c-ares \
100- re2 \
10181 cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-lib cyrus-sasl-plain \
10282 openssl
10383
104- COPY --from=build /usr/local/ /usr/local/
10584COPY --from=build /src/cmake-install/ /usr/local
10685
10786RUN mkdir /var/lib/cli-cpp && \
You can’t perform that action at this time.
0 commit comments