blob: 5604fcb764a9b9b0d4ac26823ced98a645a0821b [file] [log] [blame]
ss412g1a79bdf2019-10-24 12:03:05 +03001##############################################################################
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##############################################################################
ss412g3bac2da2020-01-05 11:52:19 +020018
nm755n2e268142019-11-28 16:40:23 +000019#
20# This source code is part of the near-RT RIC (RAN Intelligent Controller)
21# platform project (RICP).
22#
ss412g1a79bdf2019-10-24 12:03:05 +030023
ss412g3bac2da2020-01-05 11:52:19 +020024FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu16-c-go:3-u16.04-nng as ubuntu
ss412g1a79bdf2019-10-24 12:03:05 +030025
26WORKDIR /opt/e2/
27
28RUN mkdir -p /opt/e2/RIC-E2-TERMINATION/ \
29 && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T1 \
ss412g3bac2da2020-01-05 11:52:19 +020030 && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T2 \
31 && mkdir -p /opt/e2/RIC-E2-TERMINATION/3rdparty
32
ss412g1a79bdf2019-10-24 12:03:05 +030033COPY . /opt/e2/RIC-E2-TERMINATION/
34RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/
35
ss412g3bac2da2020-01-05 11:52:19 +020036RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_1.13.0_amd64.deb/download.deb
37RUN dpkg -i rmr_1.13.0_amd64.deb
38RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_1.13.0_amd64.deb/download.deb
39RUN dpkg -i rmr-dev_1.13.0_amd64.deb
40
41ARG BUILD_TYPE=Release
ss412g1a79bdf2019-10-24 12:03:05 +030042
43RUN apt-get install -y autoconf gawk libtool automake pkg-config autoconf-archive \
44 && git clone http://gerrit.o-ran-sc.org/r/com/log \
ss412g3bac2da2020-01-05 11:52:19 +020045 && 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
58RUN if [$BUILD_TYPE == "Debug"] ; then make e2_coverage ; fi
ss412g1a79bdf2019-10-24 12:03:05 +030059
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
70FROM ubuntu:16.04
ss412g3bac2da2020-01-05 11:52:19 +020071RUN apt-get update && apt-get install -y net-tools iputils-ping curl tcpdump && mkdir -p /opt/e2/config
ss412g1a79bdf2019-10-24 12:03:05 +030072
73COPY --from=ubuntu /opt/e2/e2 /opt/e2/e2
74COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/dockerRouter.txt /opt/e2/dockerRouter.txt
ss412g3bac2da2020-01-05 11:52:19 +020075COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/config/config.conf /opt/e2/config/config.conf
ss412g1a79bdf2019-10-24 12:03:05 +030076#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
80COPY --from=ubuntu /usr/local/lib/librmr_nng.so.1 /usr/local/lib/librmr_nng.so.1
81COPY --from=ubuntu /usr/local/lib/librmr_nng.so /usr/local/lib/librmr_nng.so
ss412g3bac2da2020-01-05 11:52:19 +020082COPY --from=ubuntu /usr/local/lib/librmr_nng.so.1.13.0 /usr/local/lib/librmr_nng.so.1.13.0
ss412g1a79bdf2019-10-24 12:03:05 +030083COPY --from=ubuntu /usr/local/lib/libnng.so.1 /usr/local/lib/libnng.so.1
84COPY --from=ubuntu /usr/local/lib/libmdclog.so.0 /usr/local/lib/libmdclog.so.0
85
86COPY --from=ubuntu /usr/lib/libboost_log_setup.so /usr/lib/libboost_log_setup.so
87COPY --from=ubuntu /usr/lib/libboost_log_setup.so.1.69.0 /usr/lib/libboost_log_setup.so.1.69.0
88
ss412g3bac2da2020-01-05 11:52:19 +020089COPY --from=ubuntu /usr/local/lib/libpistache.so /usr/local/lib/libpistache.so
90COPY --from=ubuntu /usr/local/lib/libpistache.so.0 /usr/local/lib/libpistache.so.0
91COPY --from=ubuntu /usr/local/lib/libpistache.so.0.0.001-git20191031 /usr/local/lib/libpistache.so.0.0.001-git20191031
92
93
ss412g1a79bdf2019-10-24 12:03:05 +030094COPY --from=ubuntu /usr/lib/libboost_log.so /usr/lib/libboost_log.so
95COPY --from=ubuntu /usr/lib/libboost_log.so.1.69.0 /usr/lib/libboost_log.so.1.69.0
96
97COPY --from=ubuntu /usr/lib/libboost_thread.so /usr/lib/libboost_thread.so
98COPY --from=ubuntu /usr/lib/libboost_thread.so.1.69.0 /usr/lib/libboost_thread.so.1.69.0
99
100COPY --from=ubuntu /usr/lib/libboost_filesystem.so /usr/lib/libboost_filesystem.so
101COPY --from=ubuntu /usr/lib/libboost_filesystem.so.1.69.0 /usr/lib/libboost_filesystem.so.1.69.0
102
103COPY --from=ubuntu /usr/lib/libboost_regex.so /usr/lib/libboost_regex.so
104COPY --from=ubuntu /usr/lib/libboost_regex.so.1.69.0 /usr/lib/libboost_regex.so.1.69.0
105
106COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so /usr/lib/x86_64-linux-gnu/libicui18n.so
107COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.55 /usr/lib/x86_64-linux-gnu/libicui18n.so.55
108COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1 /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
109
110COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib/x86_64-linux-gnu/libicuuc.so
111COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.55 /usr/lib/x86_64-linux-gnu/libicuuc.so.55
112COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1 /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
113
114COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib/x86_64-linux-gnu/libicudata.so
115COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.55 /usr/lib/x86_64-linux-gnu/libicudata.so.55
116COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.55.1 /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
117
118
119WORKDIR /opt/e2/
120ENV LD_LIBRARY_PATH=/usr/local/lib
121ENV RMR_SEED_RT=dockerRouter.txt
ss412g1a79bdf2019-10-24 12:03:05 +0300122EXPOSE 38000
ss412g3bac2da2020-01-05 11:52:19 +0200123CMD ["sh", "-c", "./e2 -p config -f config.conf"]