d86523ee4420ec2c34ff57e063669be0ae7e9ef6
[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 #   This source code is part of the near-RT RIC (RAN Intelligent Controller)
20 #   platform project (RICP).
21 #
22
23 FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu16-c-go:2-u16.04-nng as ubuntu
24
25 WORKDIR /opt/e2/
26
27 RUN mkdir -p /opt/e2/RIC-E2-TERMINATION/ \
28     && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T1 \
29     && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T2
30 COPY . /opt/e2/RIC-E2-TERMINATION/
31 RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/
32
33 RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_1.10.0_amd64.deb/download.deb
34 RUN dpkg -i rmr_1.10.0_amd64.deb
35 RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_1.10.0_amd64.deb/download.deb
36 RUN dpkg -i rmr-dev_1.10.0_amd64.deb
37
38 RUN apt-get install -y autoconf gawk libtool automake pkg-config autoconf-archive \
39     && git clone http://gerrit.o-ran-sc.org/r/com/log \
40     && cd log \
41     && ./autogen.sh && ./configure && make && make install && ldconfig \
42     && cd /opt/e2/ && /usr/local/bin/cmake . && make
43
44 #    && git clone http://gerrit.o-ran-sc.org/r/ric-plt/tracelibcpp \
45 #    && cd tracelibcpp && mkdir build && cd build  \
46 #    &&  sed -i '19iset\(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3"\)' ../CMakeLists.txt \
47 #    &&  sed -i '19iset\(CMAKE_CXX_STANDARD 17\)' ../CMakeLists.txt\
48 #    && /usr/local/bin/cmake .. && make && cd .. && cp include/tracelibcpp/tracelibcpp.hpp . && cd .. \
49 #    && mkdir nlohmann && cd nlohmann && find / -type f -name "json.hpp" -exec cp {} json.hpp \; && cd .. \
50 #    && find / -type d -name "opentracing" -exec cp -r {} . \; \
51 #    && cd /usr/local/lib/ && find / -type f -name "libyaml-cpp.a" -exec cp {} libyaml-cpp.a \; \
52 #    && find / -type f -name "libopentracing.a" -exec cp {} libopentracing.a \; && cd /opt/e2/RIC-E2-TERMINATION && ls nlohmann  \
53
54 FROM ubuntu:16.04
55 RUN apt-get update && apt-get install -y net-tools iputils-ping curl tcpdump
56
57 COPY --from=ubuntu /opt/e2/e2 /opt/e2/e2
58 COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/dockerRouter.txt /opt/e2/dockerRouter.txt
59 #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so /usr/local/lib/libtracelibcpp.so
60 #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0 /usr/local/lib/libtracelibcpp.so.0
61 #COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0.0.2 /usr/local/lib/libtracelibcpp.so.0.0.2
62 #COPY --from=ubuntu /usr/local/lib/librmr_nng.a /usr/local/lib/librmr_nng.a
63 COPY --from=ubuntu /usr/local/lib/librmr_nng.so.1 /usr/local/lib/librmr_nng.so.1
64 COPY --from=ubuntu /usr/local/lib/librmr_nng.so /usr/local/lib/librmr_nng.so
65 COPY --from=ubuntu /usr/local/lib/librmr_nng.so.1.10.0 /usr/local/lib/librmr_nng.so.1.10.0
66 COPY --from=ubuntu /usr/local/lib/libnng.so.1 /usr/local/lib/libnng.so.1
67 COPY --from=ubuntu /usr/local/lib/libmdclog.so.0 /usr/local/lib/libmdclog.so.0
68
69 COPY --from=ubuntu /usr/lib/libboost_log_setup.so /usr/lib/libboost_log_setup.so
70 COPY --from=ubuntu /usr/lib/libboost_log_setup.so.1.69.0 /usr/lib/libboost_log_setup.so.1.69.0
71
72 COPY --from=ubuntu /usr/lib/libboost_log.so /usr/lib/libboost_log.so
73 COPY --from=ubuntu /usr/lib/libboost_log.so.1.69.0 /usr/lib/libboost_log.so.1.69.0
74
75 COPY --from=ubuntu /usr/lib/libboost_thread.so /usr/lib/libboost_thread.so
76 COPY --from=ubuntu /usr/lib/libboost_thread.so.1.69.0 /usr/lib/libboost_thread.so.1.69.0
77
78 COPY --from=ubuntu /usr/lib/libboost_filesystem.so /usr/lib/libboost_filesystem.so
79 COPY --from=ubuntu /usr/lib/libboost_filesystem.so.1.69.0 /usr/lib/libboost_filesystem.so.1.69.0
80
81 COPY --from=ubuntu /usr/lib/libboost_regex.so /usr/lib/libboost_regex.so
82 COPY --from=ubuntu /usr/lib/libboost_regex.so.1.69.0 /usr/lib/libboost_regex.so.1.69.0
83
84 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so /usr/lib/x86_64-linux-gnu/libicui18n.so
85 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.55 /usr/lib/x86_64-linux-gnu/libicui18n.so.55
86 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1 /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
87
88 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib/x86_64-linux-gnu/libicuuc.so
89 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.55 /usr/lib/x86_64-linux-gnu/libicuuc.so.55
90 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1 /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
91
92 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib/x86_64-linux-gnu/libicudata.so
93 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.55 /usr/lib/x86_64-linux-gnu/libicudata.so.55
94 COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.55.1 /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
95
96
97 WORKDIR /opt/e2/
98 ENV LD_LIBRARY_PATH=/usr/local/lib
99 ENV RMR_SEED_RT=dockerRouter.txt
100 ENV nano=38000
101 ENV loglevel=info
102 ENV volume="."
103 EXPOSE 38000
104 CMD ["sh", "-c", "./e2 nano $nano loglevel $loglevel volume $volume"]