blob: f34126860fdbbea4a58daf4e6480b47f9c1ad67c [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#
ss412g7ead60b2020-03-23 11:48:59 +020023FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu18-c-go:5-u18.04-nng as ubuntu
aa7133@att.coma8a819f2020-03-16 12:04:24 +020024#FROM 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
aa7133@att.coma8a819f2020-03-16 12:04:24 +020028ARG BUILD_TYPE="Release"
29
ss412g1a79bdf2019-10-24 12:03:05 +030030RUN mkdir -p /opt/e2/RIC-E2-TERMINATION/ \
31 && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T1 \
ss412g3bac2da2020-01-05 11:52:19 +020032 && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T2 \
33 && mkdir -p /opt/e2/RIC-E2-TERMINATION/3rdparty
34
ss412g1a79bdf2019-10-24 12:03:05 +030035COPY . /opt/e2/RIC-E2-TERMINATION/
36RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/
37
aa7133@att.coma8a819f2020-03-16 12:04:24 +020038RUN cat /opt/e2/RIC-E2-TERMINATION/config/config.conf
ss412g3bac2da2020-01-05 11:52:19 +020039
aa7133@att.coma8a819f2020-03-16 12:04:24 +020040RUN wget --content-disposition https://github.com/cgreen-devs/cgreen/releases/download/1.2.0/cgreen_1.2.0_amd64.deb \
41 && dpkg -i cgreen_1.2.0_amd64.deb \
ss412g1d549dc2020-03-24 01:27:22 +020042 && wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_3.6.2_amd64.deb/download.deb \
43 && dpkg -i rmr_3.6.2_amd64.deb \
44 && wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_3.6.2_amd64.deb/download.deb \
45 && dpkg -i rmr-dev_3.6.2_amd64.deb
ss412g1a79bdf2019-10-24 12:03:05 +030046
aa7133@att.coma8a819f2020-03-16 12:04:24 +020047RUN apt-get install -y libcurl4-gnutls-dev gawk \
48 && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/oktal/pistache.git && cd pistache \
49 && git submodule update --init && mkdir build && cd build \
50 && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DPISTACHE_BUILD_DOCS=false \
51 -DPISTACHE_USE_SSL=false -DPISTACHE_BUILD_TESTS=false -DCMAKE_INSTALL_PREFIX=/usr/local ../ \
52 && make -j && make install && ldconfig \
aa7133@att.comb5903cc2020-03-22 21:04:40 +020053 && git clone http://gerrit.o-ran-sc.org/r/com/log \
ss412g3bac2da2020-01-05 11:52:19 +020054 && cd log && ./autogen.sh && ./configure && make && make install && ldconfig \
55 && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/jarro2783/cxxopts.git \
56 && cd cxxopts && mkdir build && cd build && cmake .. && make install && ldconfig \
57 && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/Tencent/rapidjson.git \
58 && cd rapidjson && mkdir build && cd build && cmake .. && make install && ldconfig \
ss412g3bac2da2020-01-05 11:52:19 +020059 && cd /opt/e2/RIC-E2-TERMINATION/3rdparty \
ss412g3bac2da2020-01-05 11:52:19 +020060 && cd /opt/e2/ && git clone https://github.com/bilke/cmake-modules.git \
aa7133@att.comb5903cc2020-03-22 21:04:40 +020061 && cd /opt/e2/ && /usr/local/bin/cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE . && make \
62 && echo "3" > /opt/e2/rmr.verbose
63
ss412g3bac2da2020-01-05 11:52:19 +020064
aa7133@att.com4f961d42020-01-20 18:55:15 +020065
ss412g3bac2da2020-01-05 11:52:19 +020066RUN if [$BUILD_TYPE == "Debug"] ; then make e2_coverage ; fi
ss412g1a79bdf2019-10-24 12:03:05 +030067
68# && git clone http://gerrit.o-ran-sc.org/r/ric-plt/tracelibcpp \
69# && cd tracelibcpp && mkdir build && cd build \
70# && sed -i '19iset\(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3"\)' ../CMakeLists.txt \
71# && sed -i '19iset\(CMAKE_CXX_STANDARD 17\)' ../CMakeLists.txt\
72# && /usr/local/bin/cmake .. && make && cd .. && cp include/tracelibcpp/tracelibcpp.hpp . && cd .. \
73# && mkdir nlohmann && cd nlohmann && find / -type f -name "json.hpp" -exec cp {} json.hpp \; && cd .. \
74# && find / -type d -name "opentracing" -exec cp -r {} . \; \
75# && cd /usr/local/lib/ && find / -type f -name "libyaml-cpp.a" -exec cp {} libyaml-cpp.a \; \
76# && find / -type f -name "libopentracing.a" -exec cp {} libopentracing.a \; && cd /opt/e2/RIC-E2-TERMINATION && ls nlohmann \
77
aa7133@att.coma8a819f2020-03-16 12:04:24 +020078FROM ubuntu:18.04
ss412g6a836c92020-03-24 22:43:56 +020079
80RUN apt-get update && apt-get install -y \
81 net-tools \
82 iputils-ping \
83 curl \
84 tcpdump
85
aa7133@att.coma8a819f2020-03-16 12:04:24 +020086RUN mkdir -p /opt/e2/config
ss412g1a79bdf2019-10-24 12:03:05 +030087
88COPY --from=ubuntu /opt/e2/e2 /opt/e2/e2
aa7133@att.comb5903cc2020-03-22 21:04:40 +020089COPY --from=ubuntu /opt/e2/rmr.verbose /tmp/rmr.verbose
ss412g1a79bdf2019-10-24 12:03:05 +030090COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/dockerRouter.txt /opt/e2/dockerRouter.txt
ss412g3bac2da2020-01-05 11:52:19 +020091COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/config/config.conf /opt/e2/config/config.conf
root8db75912020-01-23 17:11:52 +000092COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/startup.sh /opt/e2/startup.sh
ss412g1a79bdf2019-10-24 12:03:05 +030093#COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so /usr/local/lib/libtracelibcpp.so
94#COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0 /usr/local/lib/libtracelibcpp.so.0
95#COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0.0.2 /usr/local/lib/libtracelibcpp.so.0.0.2
96#COPY --from=ubuntu /usr/local/lib/librmr_nng.a /usr/local/lib/librmr_nng.a
aa7133@att.coma8a819f2020-03-16 12:04:24 +020097
98COPY --from=ubuntu /usr/local/lib/libnng.so /usr/local/lib/libnng.so
99COPY --from=ubuntu /usr/local/lib/libnng.so.1 /usr/local/lib/libnng.so.1
100COPY --from=ubuntu /usr/local/lib/libnng.so.1.1.0 /usr/local/lib/libnng.so.1.1.0
101#
ss412g1d549dc2020-03-24 01:27:22 +0200102COPY --from=ubuntu /usr/local/lib/librmr_nng.so.3.6.2 /usr/local/lib/librmr_nng.so.3.6.2
103COPY --from=ubuntu /usr/local/lib/librmr_si.so.3.6.2 /usr/local/lib/librmr_si.so.3.6.2
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200104COPY --from=ubuntu /usr/local/lib/librmr_si.so.3 /usr/local/lib/librmr_si.so.3
105COPY --from=ubuntu /usr/local/lib/librmr_si.so /usr/local/lib/librmr_si.so
106COPY --from=ubuntu /usr/local/lib/librmr_nng.so.3 /usr/local/lib/librmr_nng.so.3
107COPY --from=ubuntu /usr/local/lib/librmr_nng.so /usr/local/lib/librmr_nng.so
108
109
ss412g1a79bdf2019-10-24 12:03:05 +0300110COPY --from=ubuntu /usr/local/lib/libmdclog.so.0 /usr/local/lib/libmdclog.so.0
111
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200112COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so /usr/local/libcgreen.so
113COPY --from=ubuntu //usr/lib/x86_64-linux-gnu/libcgreen.so.1 /usr/local/libcgreen.so.1
114COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so.1.2.0 /usr/local/libcgreen.so.1.2.0
115
ss412g1a79bdf2019-10-24 12:03:05 +0300116COPY --from=ubuntu /usr/lib/libboost_log_setup.so /usr/lib/libboost_log_setup.so
117COPY --from=ubuntu /usr/lib/libboost_log_setup.so.1.69.0 /usr/lib/libboost_log_setup.so.1.69.0
118
aa7133@att.com79bd3742020-01-21 09:10:19 +0200119#COPY --from=ubuntu /usr/local/lib/libpistache.so /usr/local/lib/libpistache.so
120#COPY --from=ubuntu /usr/local/lib/libpistache.so.0 /usr/local/lib/libpistache.so.0
121#COPY --from=ubuntu /usr/local/lib/libpistache.so.0.0.001-git20191031 /usr/local/lib/libpistache.so.0.0.001-git20191031
ss412g3bac2da2020-01-05 11:52:19 +0200122
123
ss412g1a79bdf2019-10-24 12:03:05 +0300124COPY --from=ubuntu /usr/lib/libboost_log.so /usr/lib/libboost_log.so
125COPY --from=ubuntu /usr/lib/libboost_log.so.1.69.0 /usr/lib/libboost_log.so.1.69.0
126
127COPY --from=ubuntu /usr/lib/libboost_thread.so /usr/lib/libboost_thread.so
128COPY --from=ubuntu /usr/lib/libboost_thread.so.1.69.0 /usr/lib/libboost_thread.so.1.69.0
129
130COPY --from=ubuntu /usr/lib/libboost_filesystem.so /usr/lib/libboost_filesystem.so
131COPY --from=ubuntu /usr/lib/libboost_filesystem.so.1.69.0 /usr/lib/libboost_filesystem.so.1.69.0
132
133COPY --from=ubuntu /usr/lib/libboost_regex.so /usr/lib/libboost_regex.so
134COPY --from=ubuntu /usr/lib/libboost_regex.so.1.69.0 /usr/lib/libboost_regex.so.1.69.0
135
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200136COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so /usr/lib/libicui18n.so
137COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.60.2 /usr/lib/libicui18n.so.60.2
138COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.60 /usr/lib/libicui18n.so.60
ss412g1a79bdf2019-10-24 12:03:05 +0300139
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200140COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib/libicuuc.so
141COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.60.2 /usr/lib/libicuuc.so.60.2
142COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.60 /usr/lib/libicuuc.so.60
ss412g1a79bdf2019-10-24 12:03:05 +0300143
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200144COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib/libicudata.so
145COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.60.2 /usr/lib/libicudata.so.60.2
146COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.60 /usr/lib/libicudata.so.60
ss412g1a79bdf2019-10-24 12:03:05 +0300147
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200148COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6
ss412g1a79bdf2019-10-24 12:03:05 +0300149
150WORKDIR /opt/e2/
151ENV LD_LIBRARY_PATH=/usr/local/lib
152ENV RMR_SEED_RT=dockerRouter.txt
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200153ENV E2TERM_POD_NAME=e2term
root8db75912020-01-23 17:11:52 +0000154RUN chmod +x /opt/e2/startup.sh
ss412g1a79bdf2019-10-24 12:03:05 +0300155EXPOSE 38000
root8db75912020-01-23 17:11:52 +0000156CMD ["sh", "-c", "./startup.sh"]
ss412g1b912dd2020-03-29 14:11:24 +0300157