[multi E2T] - support rmr debug level changes
[ric-plt/e2.git] / RIC-E2-TERMINATION / Dockerfile
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 ##############################################################################
18
19 #
20 #   This source code is part of the near-RT RIC (RAN Intelligent Controller)
21 #   platform project (RICP).
22 #
23
24 FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu16-c-go:3-u16.04-nng as ubuntu
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 \
30     && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T2 \
31     && mkdir -p /opt/e2/RIC-E2-TERMINATION/3rdparty
32
33 COPY . /opt/e2/RIC-E2-TERMINATION/
34 RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/
35
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
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 \
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 \
51     && wget --content-disposition https://github.com/cgreen-devs/cgreen/releases/download/1.2.0/cgreen_1.2.0_amd64.deb \
52     && dpkg -i cgreen_1.2.0_amd64.deb \
53     && cd /opt/e2/ && git clone https://github.com/bilke/cmake-modules.git \
54     && cd /opt/e2/ && /usr/local/bin/cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE . && make
55
56 #    && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/oktal/pistache.git\
57 #    && cd pistache && git submodule update --init && mkdir build && cd build && cmake .. && make install && ldconfig\
58
59
60 RUN if [$BUILD_TYPE == "Debug"] ; then make e2_coverage ; fi
61
62 #    && git clone http://gerrit.o-ran-sc.org/r/ric-plt/tracelibcpp \
63 #    && cd tracelibcpp && mkdir build && cd build  \
64 #    &&  sed -i '19iset\(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3"\)' ../CMakeLists.txt \
65 #    &&  sed -i '19iset\(CMAKE_CXX_STANDARD 17\)' ../CMakeLists.txt\
66 #    && /usr/local/bin/cmake .. && make && cd .. && cp include/tracelibcpp/tracelibcpp.hpp . && cd .. \
67 #    && mkdir nlohmann && cd nlohmann && find / -type f -name "json.hpp" -exec cp {} json.hpp \; && cd .. \
68 #    && find / -type d -name "opentracing" -exec cp -r {} . \; \
69 #    && cd /usr/local/lib/ && find / -type f -name "libyaml-cpp.a" -exec cp {} libyaml-cpp.a \; \
70 #    && find / -type f -name "libopentracing.a" -exec cp {} libopentracing.a \; && cd /opt/e2/RIC-E2-TERMINATION && ls nlohmann  \
71
72 FROM ubuntu:16.04
73 RUN apt-get update && apt-get install -y net-tools iputils-ping curl tcpdump && mkdir -p /opt/e2/config
74
75 COPY --from=ubuntu /opt/e2/e2 /opt/e2/e2
76 COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/dockerRouter.txt /opt/e2/dockerRouter.txt
77 COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/config/config.conf /opt/e2/config/config.conf
78 COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/startup.sh /opt/e2/startup.sh
79 COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/config/rmr.verbose /opt/e2/config/rmr.verbose
80 #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so /usr/local/lib/libtracelibcpp.so
81 #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0 /usr/local/lib/libtracelibcpp.so.0
82 #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0.0.2 /usr/local/lib/libtracelibcpp.so.0.0.2
83 #COPY --from=ubuntu /usr/local/lib/librmr_nng.a /usr/local/lib/librmr_nng.a
84 COPY --from=ubuntu /usr/local/lib/librmr_nng.so.1 /usr/local/lib/librmr_nng.so.1
85 COPY --from=ubuntu /usr/local/lib/librmr_nng.so /usr/local/lib/librmr_nng.so
86 COPY --from=ubuntu /usr/local/lib/librmr_nng.so.1.13.0 /usr/local/lib/librmr_nng.so.1.13.0
87 COPY --from=ubuntu /usr/local/lib/libnng.so.1 /usr/local/lib/libnng.so.1
88 COPY --from=ubuntu /usr/local/lib/libmdclog.so.0 /usr/local/lib/libmdclog.so.0
89
90 COPY --from=ubuntu /usr/lib/libboost_log_setup.so /usr/lib/libboost_log_setup.so
91 COPY --from=ubuntu /usr/lib/libboost_log_setup.so.1.69.0 /usr/lib/libboost_log_setup.so.1.69.0
92
93 #COPY --from=ubuntu /usr/local/lib/libpistache.so  /usr/local/lib/libpistache.so
94 #COPY --from=ubuntu /usr/local/lib/libpistache.so.0  /usr/local/lib/libpistache.so.0
95 #COPY --from=ubuntu /usr/local/lib/libpistache.so.0.0.001-git20191031  /usr/local/lib/libpistache.so.0.0.001-git20191031
96
97
98 COPY --from=ubuntu /usr/lib/libboost_log.so /usr/lib/libboost_log.so
99 COPY --from=ubuntu /usr/lib/libboost_log.so.1.69.0 /usr/lib/libboost_log.so.1.69.0
100
101 COPY --from=ubuntu /usr/lib/libboost_thread.so /usr/lib/libboost_thread.so
102 COPY --from=ubuntu /usr/lib/libboost_thread.so.1.69.0 /usr/lib/libboost_thread.so.1.69.0
103
104 COPY --from=ubuntu /usr/lib/libboost_filesystem.so /usr/lib/libboost_filesystem.so
105 COPY --from=ubuntu /usr/lib/libboost_filesystem.so.1.69.0 /usr/lib/libboost_filesystem.so.1.69.0
106
107 COPY --from=ubuntu /usr/lib/libboost_regex.so /usr/lib/libboost_regex.so
108 COPY --from=ubuntu /usr/lib/libboost_regex.so.1.69.0 /usr/lib/libboost_regex.so.1.69.0
109
110 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so /usr/lib/x86_64-linux-gnu/libicui18n.so
111 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.55 /usr/lib/x86_64-linux-gnu/libicui18n.so.55
112 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1 /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
113
114 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib/x86_64-linux-gnu/libicuuc.so
115 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.55 /usr/lib/x86_64-linux-gnu/libicuuc.so.55
116 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1 /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
117
118 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib/x86_64-linux-gnu/libicudata.so
119 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.55 /usr/lib/x86_64-linux-gnu/libicudata.so.55
120 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.55.1 /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
121
122
123 WORKDIR /opt/e2/
124 ENV LD_LIBRARY_PATH=/usr/local/lib
125 ENV RMR_SEED_RT=dockerRouter.txt
126 ENV RMR_VCTL_FILE=/opt/e2/config/rmr.verbose
127 RUN chmod +x /opt/e2/startup.sh
128 EXPOSE 38000
129 CMD ["sh", "-c", "./startup.sh"]