1 ##############################################################################
3 # Copyright (c) 2019 AT&T Intellectual Property.
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
9 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 ##############################################################################
20 # This source code is part of the near-RT RIC (RAN Intelligent Controller)
21 # platform project (RICP).
24 FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu16-c-go:3-u16.04-nng as ubuntu
28 RUN mkdir -p /opt/e2/RIC-E2-TERMINATION/ \
29 && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T1 \
30 && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T2 \
31 && mkdir -p /opt/e2/RIC-E2-TERMINATION/3rdparty
33 COPY . /opt/e2/RIC-E2-TERMINATION/
34 RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/
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
41 ARG BUILD_TYPE=Release
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 \
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
58 RUN if [$BUILD_TYPE == "Debug"] ; then make e2_coverage ; fi
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 \
71 RUN apt-get update && apt-get install -y net-tools iputils-ping curl tcpdump && mkdir -p /opt/e2/config
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
75 COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/config/config.conf /opt/e2/config/config.conf
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
82 COPY --from=ubuntu /usr/local/lib/librmr_nng.so.1.13.0 /usr/local/lib/librmr_nng.so.1.13.0
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
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
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
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
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
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
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
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
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
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
120 ENV LD_LIBRARY_PATH=/usr/local/lib
121 ENV RMR_SEED_RT=dockerRouter.txt
123 CMD ["sh", "-c", "./e2 -p config -f config.conf"]