-
Notifications
You must be signed in to change notification settings - Fork 417
/
Dockerfile
40 lines (37 loc) · 1.49 KB
/
Dockerfile
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
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /work
#install grpc and abseil
ARG GRPC_VERSION=v1.38.0
RUN apt-get update && apt-get install -y build-essential autoconf libtool pkg-config cmake git libssl-dev && \
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" && \
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE .. && \
make -j${nproc} install && cd ../../.. && \
mkdir build && cd build && \
cmake \
-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 && \
cd ../..
#install opentelemetry-cpp
RUN apt-get install -y --no-install-recommends libcurl4-openssl-dev && git clone --depth=1 https://github.com/open-telemetry/opentelemetry-cpp.git && \
cd opentelemetry-cpp && git submodule update --init && \
mkdir -p build && cd build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
-DWITH_ZIPKIN=ON \
-DBUILD_TESTING=OFF \
-DWITH_OTLP_GRPC=ON \
-DWITH_OTLP_HTTP=ON \
.. && \
make -j${nproc} install && ldconfig && \
cd ../..