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