ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 1 | ############################################################################## |
| 2 | # |
| 3 | # Copyright (c) 2019 AT&T Intellectual Property. |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # |
| 17 | ############################################################################## |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 18 | |
nm755n | 2e26814 | 2019-11-28 16:40:23 +0000 | [diff] [blame] | 19 | # |
| 20 | # This source code is part of the near-RT RIC (RAN Intelligent Controller) |
| 21 | # platform project (RICP). |
| 22 | # |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 23 | FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.0 as ubuntu |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 24 | |
| 25 | WORKDIR /opt/e2/ |
| 26 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 27 | ARG BUILD_TYPE="Release" |
dhirajverma | 31768a9 | 2021-05-06 12:38:49 +0530 | [diff] [blame] | 28 | RUN apt-get update |
| 29 | RUN apt-get install -y lcov |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 30 | RUN mkdir -p /opt/e2/RIC-E2-TERMINATION/ \ |
| 31 | && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T1 \ |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 32 | && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T2 \ |
| 33 | && mkdir -p /opt/e2/RIC-E2-TERMINATION/3rdparty |
| 34 | |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 35 | COPY . /opt/e2/RIC-E2-TERMINATION/ |
dhirajverma | 31768a9 | 2021-05-06 12:38:49 +0530 | [diff] [blame] | 36 | RUN apt-get install -y libgtest-dev |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 37 | RUN cd /usr/src/gtest && cmake CMakeLists.txt && make && cp lib/*.a /usr/lib |
| 38 | RUN apt-get install -y google-mock |
| 39 | RUN cd /usr/src/googletest/googlemock && cmake CMakeLists.txt && make && cp lib/*.a /usr/lib |
| 40 | RUN cp -rf /usr/src/googletest/googlemock/include/gmock /usr/include/ |
| 41 | |
dhirajverma | 949ccbe | 2022-01-31 02:53:28 -0500 | [diff] [blame] | 42 | RUN apt-get install -y libboost-all-dev |
aa7133@att.com | 9e097ab | 2020-04-22 18:07:26 +0300 | [diff] [blame] | 43 | RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/ && cat /opt/e2/RIC-E2-TERMINATION/config/config.conf \ |
| 44 | && wget --content-disposition https://github.com/cgreen-devs/cgreen/releases/download/1.2.0/cgreen_1.2.0_amd64.deb \ |
| 45 | && dpkg -i cgreen_1.2.0_amd64.deb \ |
gunjarastogi | 85f507f | 2023-01-18 16:27:55 +0530 | [diff] [blame] | 46 | && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_4.9.0_amd64.deb/download.deb \ |
| 47 | && dpkg -i rmr_4.9.0_amd64.deb \ |
| 48 | && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_4.9.0_amd64.deb/download.deb \ |
| 49 | && dpkg -i rmr-dev_4.9.0_amd64.deb \ |
dhirajverma | 5f13283 | 2021-06-17 17:27:54 +0530 | [diff] [blame] | 50 | && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog_0.1.1-1_amd64.deb/download.deb \ |
| 51 | && dpkg -i mdclog_0.1.1-1_amd64.deb \ |
| 52 | && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog-dev_0.1.1-1_amd64.deb/download.deb \ |
| 53 | && dpkg -i mdclog-dev_0.1.1-1_amd64.deb \ |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 54 | && apt-get update && apt-get install -y libcurl4-gnutls-dev gawk libtbb-dev libtbb-doc \ |
| 55 | && apt-get update && apt-get -y install libtbb2 \ |
dhirajverma | af4da6d | 2021-05-05 15:46:10 +0530 | [diff] [blame] | 56 | && apt-get install -y python3 python3-pip python3-setuptools python3-wheel ninja-build \ |
| 57 | && pip3 install meson \ |
| 58 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/pistacheio/pistache.git && cd pistache \ |
| 59 | && meson setup build \ |
| 60 | --buildtype=release -DPISTACHE_USE_SSL=false -DPISTACHE_BUILD_EXAMPLES=false -DPISTACHE_BUILD_TESTS=false \ |
| 61 | -DPISTACHE_BUILD_DOCS=false --prefix=/usr/local \ |
| 62 | && meson compile -C build && meson install -C build && ldconfig \ |
ss412g | 4aeeda2 | 2020-06-16 14:12:41 +0300 | [diff] [blame] | 63 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone -v https://github.com/jupp0r/prometheus-cpp.git \ |
| 64 | && cd prometheus-cpp && git submodule init && git submodule update && mkdir build && cd build \ |
| 65 | && cmake .. -DBUILD_SHARED_LIBS=OFF && make -j 4 && make install && ldconfig \ |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 66 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/jarro2783/cxxopts.git \ |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 67 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/Tencent/rapidjson.git \ |
aa7133@att.com | 233facd | 2020-04-02 00:10:46 +0300 | [diff] [blame] | 68 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/zeux/pugixml.git \ |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 69 | && cd /opt/e2/ && git clone https://github.com/bilke/cmake-modules.git \ |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 70 | && cd /opt/e2/ && /usr/bin/cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE . && make \ |
aa7133@att.com | b5903cc | 2020-03-22 21:04:40 +0200 | [diff] [blame] | 71 | && echo "3" > /opt/e2/rmr.verbose |
| 72 | |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 73 | |
aa7133@att.com | 4f961d4 | 2020-01-20 18:55:15 +0200 | [diff] [blame] | 74 | |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 75 | RUN if [$BUILD_TYPE == "Debug"] ; then make e2_coverage ; fi |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 76 | |
| 77 | # && git clone http://gerrit.o-ran-sc.org/r/ric-plt/tracelibcpp \ |
| 78 | # && cd tracelibcpp && mkdir build && cd build \ |
| 79 | # && sed -i '19iset\(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3"\)' ../CMakeLists.txt \ |
| 80 | # && sed -i '19iset\(CMAKE_CXX_STANDARD 17\)' ../CMakeLists.txt\ |
| 81 | # && /usr/local/bin/cmake .. && make && cd .. && cp include/tracelibcpp/tracelibcpp.hpp . && cd .. \ |
| 82 | # && mkdir nlohmann && cd nlohmann && find / -type f -name "json.hpp" -exec cp {} json.hpp \; && cd .. \ |
| 83 | # && find / -type d -name "opentracing" -exec cp -r {} . \; \ |
| 84 | # && cd /usr/local/lib/ && find / -type f -name "libyaml-cpp.a" -exec cp {} libyaml-cpp.a \; \ |
| 85 | # && find / -type f -name "libopentracing.a" -exec cp {} libopentracing.a \; && cd /opt/e2/RIC-E2-TERMINATION && ls nlohmann \ |
| 86 | |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 87 | FROM ubuntu:20.04 |
aa7133@att.com | c41673d | 2020-03-31 13:35:06 +0300 | [diff] [blame] | 88 | RUN apt-get update && apt-get install -y net-tools iputils-ping curl tcpdump && mkdir -p /opt/e2/config |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 89 | |
| 90 | COPY --from=ubuntu /opt/e2/e2 /opt/e2/e2 |
aa7133@att.com | b5903cc | 2020-03-22 21:04:40 +0200 | [diff] [blame] | 91 | COPY --from=ubuntu /opt/e2/rmr.verbose /tmp/rmr.verbose |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 92 | COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/dockerRouter.txt /opt/e2/dockerRouter.txt |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 93 | COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/config/config.conf /opt/e2/config/config.conf |
root | 8db7591 | 2020-01-23 17:11:52 +0000 | [diff] [blame] | 94 | COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/startup.sh /opt/e2/startup.sh |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 95 | #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so /usr/local/lib/libtracelibcpp.so |
| 96 | #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0 /usr/local/lib/libtracelibcpp.so.0 |
| 97 | #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0.0.2 /usr/local/lib/libtracelibcpp.so.0.0.2 |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 98 | |
aa7133@att.com | 852ee5e | 2020-04-21 17:20:24 +0300 | [diff] [blame] | 99 | |
gunjarastogi | 85f507f | 2023-01-18 16:27:55 +0530 | [diff] [blame] | 100 | COPY --from=ubuntu /usr/local/lib/librmr_si.so.4.9.0 /usr/local/lib/librmr_si.so.4.9.0 |
aa7133@att.com | f7fb148 | 2020-04-28 16:21:03 +0300 | [diff] [blame] | 101 | COPY --from=ubuntu /usr/local/lib/librmr_si.so.4 /usr/local/lib/librmr_si.so.4 |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 102 | COPY --from=ubuntu /usr/local/lib/librmr_si.so /usr/local/lib/librmr_si.so |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 103 | |
aa7133@att.com | 9e097ab | 2020-04-22 18:07:26 +0300 | [diff] [blame] | 104 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libmdclog.so /usr/local/lib/libmdclog.so |
| 105 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libmdclog.so.0 /usr/local/lib/libmdclog.so.0 |
dhirajverma | 5f13283 | 2021-06-17 17:27:54 +0530 | [diff] [blame] | 106 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libmdclog.so.0.1.7 /usr/local/lib/libmdclog.so.0.1.7 |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 107 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 108 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so /usr/local/libcgreen.so |
aa7133@att.com | 233facd | 2020-04-02 00:10:46 +0300 | [diff] [blame] | 109 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so.1 /usr/local/libcgreen.so.1 |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 110 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so.1.2.0 /usr/local/libcgreen.so.1.2.0 |
| 111 | |
aa7133@att.com | 233facd | 2020-04-02 00:10:46 +0300 | [diff] [blame] | 112 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbb.so /usr/local/libtbb.so |
| 113 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbb.so.2 /usr/local/libtbb.so.2 |
| 114 | |
| 115 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc.so /usr/local/libtbbmalloc.so |
| 116 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc.so.2 /usr/local/libtbbmalloc.so.2 |
| 117 | |
| 118 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc_proxy.so /usr/local/libtbbmalloc_proxy.so |
| 119 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc_proxy.so.2 /usr/local/libtbbmalloc_proxy.so.2 |
| 120 | |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 121 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libboost_log_setup.so /usr/lib/libboost_log_setup.so |
| 122 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libboost_log_setup.so.1.71.0 /usr/lib/libboost_log_setup.so.1.71.0 |
aa7133@att.com | 79bd374 | 2020-01-21 09:10:19 +0200 | [diff] [blame] | 123 | #COPY --from=ubuntu /usr/local/lib/libpistache.so /usr/local/lib/libpistache.so |
| 124 | #COPY --from=ubuntu /usr/local/lib/libpistache.so.0 /usr/local/lib/libpistache.so.0 |
| 125 | #COPY --from=ubuntu /usr/local/lib/libpistache.so.0.0.001-git20191031 /usr/local/lib/libpistache.so.0.0.001-git20191031 |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 126 | |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 127 | ARG DEBIAN_FRONTEND=noninteractive |
| 128 | ENV TZ='Asia/Kolkata' |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 129 | |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 130 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libboost_log.so /usr/lib/libboost_log.so |
| 131 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libboost_log.so.1.71.0 /usr/lib/libboost_log.so.1.71.0 |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 132 | |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 133 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libboost_thread.so /usr/lib/libboost_thread.so |
| 134 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.71.0 /usr/lib/libboost_thread.so.1.71.0 |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 135 | |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 136 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libboost_filesystem.so /usr/lib/libboost_filesystem.so |
| 137 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0 /usr/lib/libboost_filesystem.so.1.71.0 |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 138 | |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 139 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libboost_regex.so /usr/lib/libboost_regex.so |
| 140 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.71.0 /usr/lib/libboost_regex.so.1.71.0 |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 141 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 142 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so /usr/lib/libicui18n.so |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 143 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.66.1 /usr/lib/libicui18n.so.66.1 |
| 144 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.66 /usr/lib/libicui18n.so.66 |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 145 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 146 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib/libicuuc.so |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 147 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.66.1 /usr/lib/libicuuc.so.66.1 |
| 148 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.66 /usr/lib/libicuuc.so.66 |
| 149 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 150 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib/libicudata.so |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 151 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.66.1 /usr/lib/libicudata.so.66.1 |
| 152 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.66 /usr/lib/libicudata.so.66 |
| 153 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 154 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6 |
manoj1 | b222eac | 2021-11-15 08:58:10 -0500 | [diff] [blame] | 155 | |
| 156 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.6.0 /usr/lib/libcurl-gnutls.so.4.6.0 |
ss412g | 4aeeda2 | 2020-06-16 14:12:41 +0300 | [diff] [blame] | 157 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 /usr/lib/libcurl-gnutls.so.4 |
| 158 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so /usr/lib/libcurl-gnutls.so |
czichy | 2175dd3 | 2022-05-17 15:24:51 +0300 | [diff] [blame] | 159 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libsctp.so.1 /usr/lib/libsctp.so.1 |
Fuss, Areli (af732p) | 2ff35a7 | 2020-06-29 11:35:53 +0300 | [diff] [blame] | 160 | COPY --from=ubuntu /usr/local/bin/rmr_probe /opt/e2/rmr_probe |
ss412g | 4aeeda2 | 2020-06-16 14:12:41 +0300 | [diff] [blame] | 161 | |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 162 | WORKDIR /opt/e2/ |
| 163 | ENV LD_LIBRARY_PATH=/usr/local/lib |
| 164 | ENV RMR_SEED_RT=dockerRouter.txt |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 165 | ENV E2TERM_POD_NAME=e2term |
Fuss, Areli (af732p) | 2ff35a7 | 2020-06-29 11:35:53 +0300 | [diff] [blame] | 166 | RUN chmod +x /opt/e2/startup.sh /opt/e2/rmr_probe |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 167 | EXPOSE 38000 |
root | 8db7591 | 2020-01-23 17:11:52 +0000 | [diff] [blame] | 168 | CMD ["sh", "-c", "./startup.sh"] |