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 | # |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 23 | |
ss412g | 3bac2da | 2020-01-05 11:52:19 +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 | |
| 28 | RUN mkdir -p /opt/e2/RIC-E2-TERMINATION/ \ |
| 29 | && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T1 \ |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame^] | 30 | && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T2 \ |
| 31 | && mkdir -p /opt/e2/RIC-E2-TERMINATION/3rdparty |
| 32 | |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 33 | COPY . /opt/e2/RIC-E2-TERMINATION/ |
| 34 | RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/ |
| 35 | |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame^] | 36 | RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_1.13.0_amd64.deb/download.deb |
| 37 | RUN dpkg -i rmr_1.13.0_amd64.deb |
| 38 | RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_1.13.0_amd64.deb/download.deb |
| 39 | RUN dpkg -i rmr-dev_1.13.0_amd64.deb |
| 40 | |
| 41 | ARG BUILD_TYPE=Release |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 42 | |
| 43 | RUN apt-get install -y autoconf gawk libtool automake pkg-config autoconf-archive \ |
| 44 | && git clone http://gerrit.o-ran-sc.org/r/com/log \ |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame^] | 45 | && cd log && ./autogen.sh && ./configure && make && make install && ldconfig \ |
| 46 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/jarro2783/cxxopts.git \ |
| 47 | && cd cxxopts && mkdir build && cd build && cmake .. && make install && ldconfig \ |
| 48 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/Tencent/rapidjson.git \ |
| 49 | && cd rapidjson && mkdir build && cd build && cmake .. && make install && ldconfig \ |
| 50 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/oktal/pistache.git\ |
| 51 | && cd pistache && mkdir build && cd build && cmake .. && make install && ldconfig\ |
| 52 | && cd /opt/e2/RIC-E2-TERMINATION/3rdparty \ |
| 53 | && wget --content-disposition https://github.com/cgreen-devs/cgreen/releases/download/1.2.0/cgreen_1.2.0_amd64.deb \ |
| 54 | && dpkg -i cgreen_1.2.0_amd64.deb \ |
| 55 | && cd /opt/e2/ && git clone https://github.com/bilke/cmake-modules.git \ |
| 56 | && cd /opt/e2/ && /usr/local/bin/cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE . && make |
| 57 | |
| 58 | RUN if [$BUILD_TYPE == "Debug"] ; then make e2_coverage ; fi |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 59 | |
| 60 | # && git clone http://gerrit.o-ran-sc.org/r/ric-plt/tracelibcpp \ |
| 61 | # && cd tracelibcpp && mkdir build && cd build \ |
| 62 | # && sed -i '19iset\(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3"\)' ../CMakeLists.txt \ |
| 63 | # && sed -i '19iset\(CMAKE_CXX_STANDARD 17\)' ../CMakeLists.txt\ |
| 64 | # && /usr/local/bin/cmake .. && make && cd .. && cp include/tracelibcpp/tracelibcpp.hpp . && cd .. \ |
| 65 | # && mkdir nlohmann && cd nlohmann && find / -type f -name "json.hpp" -exec cp {} json.hpp \; && cd .. \ |
| 66 | # && find / -type d -name "opentracing" -exec cp -r {} . \; \ |
| 67 | # && cd /usr/local/lib/ && find / -type f -name "libyaml-cpp.a" -exec cp {} libyaml-cpp.a \; \ |
| 68 | # && find / -type f -name "libopentracing.a" -exec cp {} libopentracing.a \; && cd /opt/e2/RIC-E2-TERMINATION && ls nlohmann \ |
| 69 | |
| 70 | FROM ubuntu:16.04 |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame^] | 71 | 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] | 72 | |
| 73 | COPY --from=ubuntu /opt/e2/e2 /opt/e2/e2 |
| 74 | 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^] | 75 | COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/config/config.conf /opt/e2/config/config.conf |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 76 | #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so /usr/local/lib/libtracelibcpp.so |
| 77 | #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0 /usr/local/lib/libtracelibcpp.so.0 |
| 78 | #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0.0.2 /usr/local/lib/libtracelibcpp.so.0.0.2 |
| 79 | #COPY --from=ubuntu /usr/local/lib/librmr_nng.a /usr/local/lib/librmr_nng.a |
| 80 | COPY --from=ubuntu /usr/local/lib/librmr_nng.so.1 /usr/local/lib/librmr_nng.so.1 |
| 81 | COPY --from=ubuntu /usr/local/lib/librmr_nng.so /usr/local/lib/librmr_nng.so |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame^] | 82 | COPY --from=ubuntu /usr/local/lib/librmr_nng.so.1.13.0 /usr/local/lib/librmr_nng.so.1.13.0 |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 83 | COPY --from=ubuntu /usr/local/lib/libnng.so.1 /usr/local/lib/libnng.so.1 |
| 84 | COPY --from=ubuntu /usr/local/lib/libmdclog.so.0 /usr/local/lib/libmdclog.so.0 |
| 85 | |
| 86 | COPY --from=ubuntu /usr/lib/libboost_log_setup.so /usr/lib/libboost_log_setup.so |
| 87 | COPY --from=ubuntu /usr/lib/libboost_log_setup.so.1.69.0 /usr/lib/libboost_log_setup.so.1.69.0 |
| 88 | |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame^] | 89 | COPY --from=ubuntu /usr/local/lib/libpistache.so /usr/local/lib/libpistache.so |
| 90 | COPY --from=ubuntu /usr/local/lib/libpistache.so.0 /usr/local/lib/libpistache.so.0 |
| 91 | COPY --from=ubuntu /usr/local/lib/libpistache.so.0.0.001-git20191031 /usr/local/lib/libpistache.so.0.0.001-git20191031 |
| 92 | |
| 93 | |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 94 | COPY --from=ubuntu /usr/lib/libboost_log.so /usr/lib/libboost_log.so |
| 95 | COPY --from=ubuntu /usr/lib/libboost_log.so.1.69.0 /usr/lib/libboost_log.so.1.69.0 |
| 96 | |
| 97 | COPY --from=ubuntu /usr/lib/libboost_thread.so /usr/lib/libboost_thread.so |
| 98 | COPY --from=ubuntu /usr/lib/libboost_thread.so.1.69.0 /usr/lib/libboost_thread.so.1.69.0 |
| 99 | |
| 100 | COPY --from=ubuntu /usr/lib/libboost_filesystem.so /usr/lib/libboost_filesystem.so |
| 101 | COPY --from=ubuntu /usr/lib/libboost_filesystem.so.1.69.0 /usr/lib/libboost_filesystem.so.1.69.0 |
| 102 | |
| 103 | COPY --from=ubuntu /usr/lib/libboost_regex.so /usr/lib/libboost_regex.so |
| 104 | COPY --from=ubuntu /usr/lib/libboost_regex.so.1.69.0 /usr/lib/libboost_regex.so.1.69.0 |
| 105 | |
| 106 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so /usr/lib/x86_64-linux-gnu/libicui18n.so |
| 107 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.55 /usr/lib/x86_64-linux-gnu/libicui18n.so.55 |
| 108 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1 /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1 |
| 109 | |
| 110 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib/x86_64-linux-gnu/libicuuc.so |
| 111 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.55 /usr/lib/x86_64-linux-gnu/libicuuc.so.55 |
| 112 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1 /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1 |
| 113 | |
| 114 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib/x86_64-linux-gnu/libicudata.so |
| 115 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.55 /usr/lib/x86_64-linux-gnu/libicudata.so.55 |
| 116 | COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.55.1 /usr/lib/x86_64-linux-gnu/libicudata.so.55.1 |
| 117 | |
| 118 | |
| 119 | WORKDIR /opt/e2/ |
| 120 | ENV LD_LIBRARY_PATH=/usr/local/lib |
| 121 | ENV RMR_SEED_RT=dockerRouter.txt |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 122 | EXPOSE 38000 |
ss412g | 3bac2da | 2020-01-05 11:52:19 +0200 | [diff] [blame^] | 123 | CMD ["sh", "-c", "./e2 -p config -f config.conf"] |