LC for E2 for ORAN
[ric-plt/e2.git] / RIC-E2-TERMINATION / Dockerfile
index de2ba4c..c51382a 100644 (file)
 #   This source code is part of the near-RT RIC (RAN Intelligent Controller)
 #   platform project (RICP).
 #
-FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:9-u18.04 as ubuntu
+FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as ubuntu
 
 WORKDIR /opt/e2/
 
 ARG BUILD_TYPE="Release"
-
+RUN apt-get update
+RUN apt-get install -y lcov
 RUN mkdir -p /opt/e2/RIC-E2-TERMINATION/ \
     && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T1 \
     && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T2 \
     && mkdir -p /opt/e2/RIC-E2-TERMINATION/3rdparty
 
 COPY . /opt/e2/RIC-E2-TERMINATION/
+RUN apt-get install -y libgtest-dev
+RUN cd /usr/src/gtest &&  /usr/local/bin/cmake  CMakeLists.txt && make && cp *.a /usr/lib
 
 RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/ && cat /opt/e2/RIC-E2-TERMINATION/config/config.conf \
     && wget --content-disposition https://github.com/cgreen-devs/cgreen/releases/download/1.2.0/cgreen_1.2.0_amd64.deb \
     && dpkg -i cgreen_1.2.0_amd64.deb \
-    && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_4.4.6_amd64.deb/download.deb \
-    && dpkg -i rmr_4.4.6_amd64.deb \
-    && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_4.4.6_amd64.deb/download.deb \
-    && dpkg -i rmr-dev_4.4.6_amd64.deb \
-    && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog_0.0.4-1_amd64.deb/download.deb \
-    && dpkg -i mdclog_0.0.4-1_amd64.deb \
-    && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog-dev_0.0.4-1_amd64.deb/download.deb \
-    && dpkg -i mdclog-dev_0.0.4-1_amd64.deb \
+    && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_4.7.4_amd64.deb/download.deb \
+    && dpkg -i rmr_4.7.4_amd64.deb \
+    && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_4.7.4_amd64.deb/download.deb \
+    && dpkg -i rmr-dev_4.7.4_amd64.deb \
+    && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog_0.1.1-1_amd64.deb/download.deb \
+    && dpkg -i mdclog_0.1.1-1_amd64.deb \
+    && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog-dev_0.1.1-1_amd64.deb/download.deb \
+    && dpkg -i mdclog-dev_0.1.1-1_amd64.deb \
     && apt-get update && apt-get install -y libcurl4-gnutls-dev gawk libtbb-dev  libtbb-doc libtbb2 libtbb2-dbg \
-    && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/oktal/pistache.git && cd pistache \
-    && git submodule update --init && mkdir build && cd build \
-    && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DPISTACHE_BUILD_DOCS=false \
-       -DPISTACHE_USE_SSL=false -DPISTACHE_BUILD_TESTS=false -DCMAKE_INSTALL_PREFIX=/usr/local ../ \
-    && make -j && make install && ldconfig \
+    && apt-get install  -y python3 python3-pip python3-setuptools python3-wheel ninja-build \
+    && pip3 install  meson \
+    && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/pistacheio/pistache.git  && cd pistache \
+    && meson setup build  \
+       --buildtype=release -DPISTACHE_USE_SSL=false -DPISTACHE_BUILD_EXAMPLES=false  -DPISTACHE_BUILD_TESTS=false \
+        -DPISTACHE_BUILD_DOCS=false  --prefix=/usr/local \
+    && meson compile -C build  && meson install -C build  && ldconfig \
     && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone -v https://github.com/jupp0r/prometheus-cpp.git \
     && cd prometheus-cpp && git submodule init && git submodule update && mkdir build && cd build \
     && cmake .. -DBUILD_SHARED_LIBS=OFF && make -j 4  && make install && ldconfig \
@@ -87,13 +92,13 @@ COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/startup.sh /opt/e2/startup.sh
 #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0.0.2 /usr/local/lib/libtracelibcpp.so.0.0.2
 
 
-COPY --from=ubuntu /usr/local/lib/librmr_si.so.4.4.6 /usr/local/lib/librmr_si.so.4.4.6
+COPY --from=ubuntu /usr/local/lib/librmr_si.so.4.7.4 /usr/local/lib/librmr_si.so.4.7.4
 COPY --from=ubuntu /usr/local/lib/librmr_si.so.4  /usr/local/lib/librmr_si.so.4
 COPY --from=ubuntu /usr/local/lib/librmr_si.so /usr/local/lib/librmr_si.so
 
 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libmdclog.so /usr/local/lib/libmdclog.so
 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libmdclog.so.0 /usr/local/lib/libmdclog.so.0
-COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libmdclog.so.0.0.4 /usr/local/lib/libmdclog.so.0.0.4
+COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libmdclog.so.0.1.7 /usr/local/lib/libmdclog.so.0.1.7
 
 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so /usr/local/libcgreen.so
 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so.1 /usr/local/libcgreen.so.1