Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile for quick demo/troubleshooting purpose. #905

Merged
merged 3 commits into from
Dec 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions docker/ubuntuLatest/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
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 thrift
ARG THRIFT_VERSION=0.14.1
RUN apt-get install -y --no-install-recommends \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we invoke the setup_* scripts to create the container instead of duplicating the preparation steps?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes agree, this can be simplified. Will change it.

libboost-all-dev \
libevent-dev \
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 && \
cmake \
-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 \
.. && \
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 \
-DWITH_JAEGER=ON \
-DBUILD_TESTING=OFF \
-DWITH_OTLP=ON \
.. && \
make -j${nproc} install && ldconfig && \
cd ../..