Commit 19ce467d authored by Giorgio Azzinnaro's avatar Giorgio Azzinnaro

adding grpc

parent 83a62dfb
Pipeline #21232722 passed with stages
in 41 minutes and 25 seconds
# RocksDB is the first dependency
FROM buildpack-deps AS rocksdb FROM buildpack-deps AS rocksdb
ENV INSTALL_PATH /opt/rocksdb ENV INSTALL_PATH /opt/rocksdb
RUN wget https://github.com/facebook/rocksdb/archive/v5.12.4.tar.gz && \ RUN apt-get update -y && \
apt-get install -y \
libbz2-dev \
libgflags-dev \
liblz4-dev \
libsnappy-dev \
libzstd-dev \
zlib1g-dev && \
wget https://github.com/facebook/rocksdb/archive/v5.12.4.tar.gz && \
tar xzvf v5.12.4.tar.gz && \ tar xzvf v5.12.4.tar.gz && \
make -C rocksdb-5.12.4 -j$(nproc) static_lib && \ make -C rocksdb-5.12.4 -j$(nproc) shared_lib && \
make -C rocksdb-5.12.4 install make -C rocksdb-5.12.4 install
# gRPC installs Protobuf too
FROM buildpack-deps AS grpc
# USER profanedb ENV prefix /opt/grpc
RUN git clone -b v1.11.x https://github.com/grpc/grpc && \
cd grpc && \
git submodule update --init && \
make -j$(nproc) && \
make install && \
make -C third_party/protobuf install prefix=$prefix
# This last step builds ProfaneDB
FROM buildpack-deps AS builder
COPY --from=rocksdb /opt/rocksdb/ /usr/local
COPY --from=grpc /opt/grpc/ /usr/local
ADD . /profanedb
RUN apt-get update -y && \
apt-get install -y \
cmake \
libboost-dev \
libboost-filesystem-dev \
libboost-log-dev \
libboost-program-options-dev \
libboost-random-dev \
libboost-test-dev
# mkdir /profanedb/build && \
# cd /profanedb/build && \
# cmake \
# -D BUILD_PROFANEDB_SERVER=ON \
# -D BUILD_TESTS=ON \
# .. && \
# make -j$(nproc)
\ No newline at end of file
...@@ -8,7 +8,9 @@ add_subdirectory(util) ...@@ -8,7 +8,9 @@ add_subdirectory(util)
add_library(profanedb) add_library(profanedb)
target_link_libraries(profanedb profanedb_format profanedb_vault profanedb_protobuf) target_link_libraries(profanedb profanedb_format profanedb_vault profanedb_protobuf)
install(TARGETS profanedb LIBRARY DESTINATION lib) install(TARGETS profanedb
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static)
if(BUILD_PROFANEDB_SERVER) if(BUILD_PROFANEDB_SERVER)
add_subdirectory(server) add_subdirectory(server)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment