-RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_1.10.0_amd64.deb/download.deb
-RUN dpkg -i rmr_1.10.0_amd64.deb
-RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_1.10.0_amd64.deb/download.deb
-RUN dpkg -i rmr-dev_1.10.0_amd64.deb
-
-RUN apt-get install -y autoconf gawk libtool automake pkg-config autoconf-archive \
- && git clone http://gerrit.o-ran-sc.org/r/com/log \
- && cd log \
- && ./autogen.sh && ./configure && make && make install && ldconfig \
- && cd /opt/e2/ && /usr/local/bin/cmake . && make
+RUN cat /opt/e2/RIC-E2-TERMINATION/config/config.conf
+
+RUN 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/staging/packages/debian/stretch/rmr_3.5.1_amd64.deb/download.deb \
+ && dpkg -i rmr_3.5.1_amd64.deb \
+ && wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_3.5.1_amd64.deb/download.deb \
+ && dpkg -i rmr-dev_3.5.1_amd64.deb
+
+RUN apt-get install -y libcurl4-gnutls-dev gawk \
+ && 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 \
+ && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone http://gerrit.o-ran-sc.org/r/com/log \
+ && cd log && ./autogen.sh && ./configure && make && make install && ldconfig \
+ && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/jarro2783/cxxopts.git \
+ && cd cxxopts && mkdir build && cd build && cmake .. && make install && ldconfig \
+ && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/Tencent/rapidjson.git \
+ && cd rapidjson && mkdir build && cd build && cmake .. && make install && ldconfig \
+ && cd /opt/e2/RIC-E2-TERMINATION/3rdparty \
+ && cd /opt/e2/ && git clone https://github.com/bilke/cmake-modules.git \
+ && cd /opt/e2/ && /usr/local/bin/cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE . && make
+
+
+RUN if [$BUILD_TYPE == "Debug"] ; then make e2_coverage ; fi