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 | # |
aa7133@att.com | 852ee5e | 2020-04-21 17:20:24 +0300 | [diff] [blame^] | 23 | FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu18-c-go:7-u18.04 as ubuntu |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 24 | #FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu16-c-go:3-u16.04-nng as ubuntu |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 25 | |
| 26 | WORKDIR /opt/e2/ |
| 27 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 28 | ARG BUILD_TYPE="Release" |
| 29 | |
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/ |
| 36 | RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/ |
| 37 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 38 | RUN cat /opt/e2/RIC-E2-TERMINATION/config/config.conf |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 39 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 40 | RUN wget --content-disposition https://github.com/cgreen-devs/cgreen/releases/download/1.2.0/cgreen_1.2.0_amd64.deb \ |
| 41 | && dpkg -i cgreen_1.2.0_amd64.deb \ |
aa7133@att.com | 852ee5e | 2020-04-21 17:20:24 +0300 | [diff] [blame^] | 42 | && wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_3.8.2_amd64.deb/download.deb \ |
| 43 | && dpkg -i rmr_3.8.2_amd64.deb \ |
| 44 | && wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_3.8.2_amd64.deb/download.deb \ |
| 45 | && dpkg -i rmr-dev_3.8.2_amd64.deb |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 46 | |
aa7133@att.com | 233facd | 2020-04-02 00:10:46 +0300 | [diff] [blame] | 47 | RUN apt-get install -y libcurl4-gnutls-dev gawk libtbb-dev libtbb-doc libtbb2 libtbb2-dbg \ |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 48 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/oktal/pistache.git && cd pistache \ |
| 49 | && git submodule update --init && mkdir build && cd build \ |
| 50 | && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DPISTACHE_BUILD_DOCS=false \ |
| 51 | -DPISTACHE_USE_SSL=false -DPISTACHE_BUILD_TESTS=false -DCMAKE_INSTALL_PREFIX=/usr/local ../ \ |
| 52 | && make -j && make install && ldconfig \ |
aa7133@att.com | b5903cc | 2020-03-22 21:04:40 +0200 | [diff] [blame] | 53 | && git clone http://gerrit.o-ran-sc.org/r/com/log \ |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 54 | && cd log && ./autogen.sh && ./configure && make && make install && ldconfig \ |
| 55 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/jarro2783/cxxopts.git \ |
aa7133@att.com | 233facd | 2020-04-02 00:10:46 +0300 | [diff] [blame] | 56 | # && cd cxxopts && mkdir build && cd build && cmake .. && make install && ldconfig \ |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 57 | && 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] | 58 | # && cd rapidjson && mkdir build && cd build && cmake .. && make install && ldconfig \ |
| 59 | && 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] | 60 | && cd /opt/e2/ && git clone https://github.com/bilke/cmake-modules.git \ |
aa7133@att.com | b5903cc | 2020-03-22 21:04:40 +0200 | [diff] [blame] | 61 | && cd /opt/e2/ && /usr/local/bin/cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE . && make \ |
| 62 | && echo "3" > /opt/e2/rmr.verbose |
| 63 | |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 64 | |
aa7133@att.com | 4f961d4 | 2020-01-20 18:55:15 +0200 | [diff] [blame] | 65 | |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame] | 66 | RUN if [$BUILD_TYPE == "Debug"] ; then make e2_coverage ; fi |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 67 | |
| 68 | # && git clone http://gerrit.o-ran-sc.org/r/ric-plt/tracelibcpp \ |
| 69 | # && cd tracelibcpp && mkdir build && cd build \ |
| 70 | # && sed -i '19iset\(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3"\)' ../CMakeLists.txt \ |
| 71 | # && sed -i '19iset\(CMAKE_CXX_STANDARD 17\)' ../CMakeLists.txt\ |
| 72 | # && /usr/local/bin/cmake .. && make && cd .. && cp include/tracelibcpp/tracelibcpp.hpp . && cd .. \ |
| 73 | # && mkdir nlohmann && cd nlohmann && find / -type f -name "json.hpp" -exec cp {} json.hpp \; && cd .. \ |
| 74 | # && find / -type d -name "opentracing" -exec cp -r {} . \; \ |
| 75 | # && cd /usr/local/lib/ && find / -type f -name "libyaml-cpp.a" -exec cp {} libyaml-cpp.a \; \ |
| 76 | # && find / -type f -name "libopentracing.a" -exec cp {} libopentracing.a \; && cd /opt/e2/RIC-E2-TERMINATION && ls nlohmann \ |
| 77 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 78 | FROM ubuntu:18.04 |
aa7133@att.com | c41673d | 2020-03-31 13:35:06 +0300 | [diff] [blame] | 79 | 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] | 80 | |
| 81 | COPY --from=ubuntu /opt/e2/e2 /opt/e2/e2 |
aa7133@att.com | b5903cc | 2020-03-22 21:04:40 +0200 | [diff] [blame] | 82 | COPY --from=ubuntu /opt/e2/rmr.verbose /tmp/rmr.verbose |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 83 | 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] | 84 | 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] | 85 | 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] | 86 | #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so /usr/local/lib/libtracelibcpp.so |
| 87 | #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0 /usr/local/lib/libtracelibcpp.so.0 |
| 88 | #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] | 89 | |
aa7133@att.com | 852ee5e | 2020-04-21 17:20:24 +0300 | [diff] [blame^] | 90 | #COPY --from=ubuntu /usr/local/lib/libnng.so /usr/local/lib/libnng.so |
| 91 | #COPY --from=ubuntu /usr/local/lib/libnng.so.1 /usr/local/lib/libnng.so.1 |
| 92 | #COPY --from=ubuntu /usr/local/lib/libnng.so.1.1.0 /usr/local/lib/libnng.so.1.1.0 |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 93 | # |
aa7133@att.com | 852ee5e | 2020-04-21 17:20:24 +0300 | [diff] [blame^] | 94 | #COPY --from=ubuntu /usr/local/lib/librmr_nng.so.3.8.2 /usr/local/lib/librmr_nng.so.3.8.2 |
| 95 | |
| 96 | COPY --from=ubuntu /usr/local/lib/librmr_si.so.3.8.2 /usr/local/lib/librmr_si.so.3.8.2 |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 97 | COPY --from=ubuntu /usr/local/lib/librmr_si.so.3 /usr/local/lib/librmr_si.so.3 |
| 98 | COPY --from=ubuntu /usr/local/lib/librmr_si.so /usr/local/lib/librmr_si.so |
aa7133@att.com | 852ee5e | 2020-04-21 17:20:24 +0300 | [diff] [blame^] | 99 | #COPY --from=ubuntu /usr/local/lib/librmr_nng.so.3 /usr/local/lib/librmr_nng.so.3 |
| 100 | #COPY --from=ubuntu /usr/local/lib/librmr_nng.so /usr/local/lib/librmr_nng.so |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 101 | |
| 102 | |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 103 | COPY --from=ubuntu /usr/local/lib/libmdclog.so.0 /usr/local/lib/libmdclog.so.0 |
| 104 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 105 | 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] | 106 | 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] | 107 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so.1.2.0 /usr/local/libcgreen.so.1.2.0 |
| 108 | |
aa7133@att.com | 233facd | 2020-04-02 00:10:46 +0300 | [diff] [blame] | 109 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbb.so /usr/local/libtbb.so |
| 110 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbb.so.2 /usr/local/libtbb.so.2 |
| 111 | |
| 112 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc.so /usr/local/libtbbmalloc.so |
| 113 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc.so.2 /usr/local/libtbbmalloc.so.2 |
| 114 | |
| 115 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc_proxy.so /usr/local/libtbbmalloc_proxy.so |
| 116 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc_proxy.so.2 /usr/local/libtbbmalloc_proxy.so.2 |
| 117 | |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 118 | COPY --from=ubuntu /usr/lib/libboost_log_setup.so /usr/lib/libboost_log_setup.so |
| 119 | COPY --from=ubuntu /usr/lib/libboost_log_setup.so.1.69.0 /usr/lib/libboost_log_setup.so.1.69.0 |
| 120 | |
aa7133@att.com | 79bd374 | 2020-01-21 09:10:19 +0200 | [diff] [blame] | 121 | #COPY --from=ubuntu /usr/local/lib/libpistache.so /usr/local/lib/libpistache.so |
| 122 | #COPY --from=ubuntu /usr/local/lib/libpistache.so.0 /usr/local/lib/libpistache.so.0 |
| 123 | #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] | 124 | |
| 125 | |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 126 | COPY --from=ubuntu /usr/lib/libboost_log.so /usr/lib/libboost_log.so |
| 127 | COPY --from=ubuntu /usr/lib/libboost_log.so.1.69.0 /usr/lib/libboost_log.so.1.69.0 |
| 128 | |
| 129 | COPY --from=ubuntu /usr/lib/libboost_thread.so /usr/lib/libboost_thread.so |
| 130 | COPY --from=ubuntu /usr/lib/libboost_thread.so.1.69.0 /usr/lib/libboost_thread.so.1.69.0 |
| 131 | |
| 132 | COPY --from=ubuntu /usr/lib/libboost_filesystem.so /usr/lib/libboost_filesystem.so |
| 133 | COPY --from=ubuntu /usr/lib/libboost_filesystem.so.1.69.0 /usr/lib/libboost_filesystem.so.1.69.0 |
| 134 | |
| 135 | COPY --from=ubuntu /usr/lib/libboost_regex.so /usr/lib/libboost_regex.so |
| 136 | COPY --from=ubuntu /usr/lib/libboost_regex.so.1.69.0 /usr/lib/libboost_regex.so.1.69.0 |
| 137 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 138 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so /usr/lib/libicui18n.so |
| 139 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.60.2 /usr/lib/libicui18n.so.60.2 |
| 140 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.60 /usr/lib/libicui18n.so.60 |
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/libicuuc.so /usr/lib/libicuuc.so |
| 143 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.60.2 /usr/lib/libicuuc.so.60.2 |
| 144 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.60 /usr/lib/libicuuc.so.60 |
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/libicudata.so /usr/lib/libicudata.so |
| 147 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.60.2 /usr/lib/libicudata.so.60.2 |
| 148 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.60 /usr/lib/libicudata.so.60 |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 149 | |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 150 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6 |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 151 | |
| 152 | WORKDIR /opt/e2/ |
| 153 | ENV LD_LIBRARY_PATH=/usr/local/lib |
| 154 | ENV RMR_SEED_RT=dockerRouter.txt |
aa7133@att.com | a8a819f | 2020-03-16 12:04:24 +0200 | [diff] [blame] | 155 | ENV E2TERM_POD_NAME=e2term |
root | 8db7591 | 2020-01-23 17:11:52 +0000 | [diff] [blame] | 156 | RUN chmod +x /opt/e2/startup.sh |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 157 | EXPOSE 38000 |
root | 8db7591 | 2020-01-23 17:11:52 +0000 | [diff] [blame] | 158 | CMD ["sh", "-c", "./startup.sh"] |