blob: 06dc832f508ee4b75b294be4555244a254b2038b [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#
aa7133@att.comc99e6052020-04-23 11:31:38 +030023FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:8-u18.04 as ubuntu
ss412g1a79bdf2019-10-24 12:03:05 +030024
25WORKDIR /opt/e2/
26
aa7133@att.coma8a819f2020-03-16 12:04:24 +020027ARG BUILD_TYPE="Release"
28
ss412g1a79bdf2019-10-24 12:03:05 +030029RUN mkdir -p /opt/e2/RIC-E2-TERMINATION/ \
30 && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T1 \
ss412g3bac2da2020-01-05 11:52:19 +020031 && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T2 \
32 && mkdir -p /opt/e2/RIC-E2-TERMINATION/3rdparty
33
ss412g1a79bdf2019-10-24 12:03:05 +030034COPY . /opt/e2/RIC-E2-TERMINATION/
ss412g1a79bdf2019-10-24 12:03:05 +030035
aa7133@att.com9e097ab2020-04-22 18:07:26 +030036RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/ && cat /opt/e2/RIC-E2-TERMINATION/config/config.conf \
37 && wget --content-disposition https://github.com/cgreen-devs/cgreen/releases/download/1.2.0/cgreen_1.2.0_amd64.deb \
38 && dpkg -i cgreen_1.2.0_amd64.deb \
aa7133@att.comf7fb1482020-04-28 16:21:03 +030039 && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_4.0.2_amd64.deb/download.deb \
40 && dpkg -i rmr_4.0.2_amd64.deb \
41 && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_4.0.2_amd64.deb/download.deb \
42 && dpkg -i rmr-dev_4.0.2_amd64.deb \
aa7133@att.com9e097ab2020-04-22 18:07:26 +030043 && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog_0.0.4-1_amd64.deb/download.deb \
44 && dpkg -i mdclog_0.0.4-1_amd64.deb \
45 && wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/mdclog-dev_0.0.4-1_amd64.deb/download.deb \
46 && dpkg -i mdclog-dev_0.0.4-1_amd64.deb \
47 && apt-get install -y libcurl4-gnutls-dev gawk libtbb-dev libtbb-doc libtbb2 libtbb2-dbg \
aa7133@att.coma8a819f2020-03-16 12:04:24 +020048 && 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 \
ss412g4aeeda22020-06-16 14:12:41 +030053 && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone -v https://github.com/jupp0r/prometheus-cpp.git \
54 && cd prometheus-cpp && git submodule init && git submodule update && mkdir build && cd build \
55 && cmake .. -DBUILD_SHARED_LIBS=OFF && make -j 4 && make install && ldconfig \
ss412g3bac2da2020-01-05 11:52:19 +020056 && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/jarro2783/cxxopts.git \
ss412g3bac2da2020-01-05 11:52:19 +020057 && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/Tencent/rapidjson.git \
aa7133@att.com233facd2020-04-02 00:10:46 +030058 && cd /opt/e2/RIC-E2-TERMINATION/3rdparty && git clone https://github.com/zeux/pugixml.git \
ss412g3bac2da2020-01-05 11:52:19 +020059 && cd /opt/e2/ && git clone https://github.com/bilke/cmake-modules.git \
aa7133@att.comb5903cc2020-03-22 21:04:40 +020060 && cd /opt/e2/ && /usr/local/bin/cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE . && make \
61 && echo "3" > /opt/e2/rmr.verbose
62
ss412g3bac2da2020-01-05 11:52:19 +020063
aa7133@att.com4f961d42020-01-20 18:55:15 +020064
ss412g3bac2da2020-01-05 11:52:19 +020065RUN if [$BUILD_TYPE == "Debug"] ; then make e2_coverage ; fi
ss412g1a79bdf2019-10-24 12:03:05 +030066
67# && git clone http://gerrit.o-ran-sc.org/r/ric-plt/tracelibcpp \
68# && cd tracelibcpp && mkdir build && cd build \
69# && sed -i '19iset\(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3"\)' ../CMakeLists.txt \
70# && sed -i '19iset\(CMAKE_CXX_STANDARD 17\)' ../CMakeLists.txt\
71# && /usr/local/bin/cmake .. && make && cd .. && cp include/tracelibcpp/tracelibcpp.hpp . && cd .. \
72# && mkdir nlohmann && cd nlohmann && find / -type f -name "json.hpp" -exec cp {} json.hpp \; && cd .. \
73# && find / -type d -name "opentracing" -exec cp -r {} . \; \
74# && cd /usr/local/lib/ && find / -type f -name "libyaml-cpp.a" -exec cp {} libyaml-cpp.a \; \
75# && find / -type f -name "libopentracing.a" -exec cp {} libopentracing.a \; && cd /opt/e2/RIC-E2-TERMINATION && ls nlohmann \
76
aa7133@att.coma8a819f2020-03-16 12:04:24 +020077FROM ubuntu:18.04
aa7133@att.comc41673d2020-03-31 13:35:06 +030078RUN apt-get update && apt-get install -y net-tools iputils-ping curl tcpdump && mkdir -p /opt/e2/config
ss412g1a79bdf2019-10-24 12:03:05 +030079
80COPY --from=ubuntu /opt/e2/e2 /opt/e2/e2
aa7133@att.comb5903cc2020-03-22 21:04:40 +020081COPY --from=ubuntu /opt/e2/rmr.verbose /tmp/rmr.verbose
ss412g1a79bdf2019-10-24 12:03:05 +030082COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/dockerRouter.txt /opt/e2/dockerRouter.txt
ss412g3bac2da2020-01-05 11:52:19 +020083COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/config/config.conf /opt/e2/config/config.conf
root8db75912020-01-23 17:11:52 +000084COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/startup.sh /opt/e2/startup.sh
ss412g1a79bdf2019-10-24 12:03:05 +030085#COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so /usr/local/lib/libtracelibcpp.so
86#COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0 /usr/local/lib/libtracelibcpp.so.0
87#COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/tracelibcpp/build/libtracelibcpp.so.0.0.2 /usr/local/lib/libtracelibcpp.so.0.0.2
aa7133@att.coma8a819f2020-03-16 12:04:24 +020088
aa7133@att.com852ee5e2020-04-21 17:20:24 +030089
aa7133@att.comf7fb1482020-04-28 16:21:03 +030090COPY --from=ubuntu /usr/local/lib/librmr_si.so.4.0.2 /usr/local/lib/librmr_si.so.4.0.2
91COPY --from=ubuntu /usr/local/lib/librmr_si.so.4 /usr/local/lib/librmr_si.so.4
aa7133@att.coma8a819f2020-03-16 12:04:24 +020092COPY --from=ubuntu /usr/local/lib/librmr_si.so /usr/local/lib/librmr_si.so
aa7133@att.coma8a819f2020-03-16 12:04:24 +020093
aa7133@att.com9e097ab2020-04-22 18:07:26 +030094COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libmdclog.so /usr/local/lib/libmdclog.so
95COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libmdclog.so.0 /usr/local/lib/libmdclog.so.0
96COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libmdclog.so.0.0.4 /usr/local/lib/libmdclog.so.0.0.4
ss412g1a79bdf2019-10-24 12:03:05 +030097
aa7133@att.coma8a819f2020-03-16 12:04:24 +020098COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so /usr/local/libcgreen.so
aa7133@att.com233facd2020-04-02 00:10:46 +030099COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so.1 /usr/local/libcgreen.so.1
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200100COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcgreen.so.1.2.0 /usr/local/libcgreen.so.1.2.0
101
aa7133@att.com233facd2020-04-02 00:10:46 +0300102COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbb.so /usr/local/libtbb.so
103COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbb.so.2 /usr/local/libtbb.so.2
104
105COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc.so /usr/local/libtbbmalloc.so
106COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc.so.2 /usr/local/libtbbmalloc.so.2
107
108COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc_proxy.so /usr/local/libtbbmalloc_proxy.so
109COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libtbbmalloc_proxy.so.2 /usr/local/libtbbmalloc_proxy.so.2
110
ss412g1a79bdf2019-10-24 12:03:05 +0300111COPY --from=ubuntu /usr/lib/libboost_log_setup.so /usr/lib/libboost_log_setup.so
112COPY --from=ubuntu /usr/lib/libboost_log_setup.so.1.69.0 /usr/lib/libboost_log_setup.so.1.69.0
113
aa7133@att.com79bd3742020-01-21 09:10:19 +0200114#COPY --from=ubuntu /usr/local/lib/libpistache.so /usr/local/lib/libpistache.so
115#COPY --from=ubuntu /usr/local/lib/libpistache.so.0 /usr/local/lib/libpistache.so.0
116#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 +0200117
118
ss412g1a79bdf2019-10-24 12:03:05 +0300119COPY --from=ubuntu /usr/lib/libboost_log.so /usr/lib/libboost_log.so
120COPY --from=ubuntu /usr/lib/libboost_log.so.1.69.0 /usr/lib/libboost_log.so.1.69.0
121
122COPY --from=ubuntu /usr/lib/libboost_thread.so /usr/lib/libboost_thread.so
123COPY --from=ubuntu /usr/lib/libboost_thread.so.1.69.0 /usr/lib/libboost_thread.so.1.69.0
124
125COPY --from=ubuntu /usr/lib/libboost_filesystem.so /usr/lib/libboost_filesystem.so
126COPY --from=ubuntu /usr/lib/libboost_filesystem.so.1.69.0 /usr/lib/libboost_filesystem.so.1.69.0
127
128COPY --from=ubuntu /usr/lib/libboost_regex.so /usr/lib/libboost_regex.so
129COPY --from=ubuntu /usr/lib/libboost_regex.so.1.69.0 /usr/lib/libboost_regex.so.1.69.0
130
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200131COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so /usr/lib/libicui18n.so
132COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.60.2 /usr/lib/libicui18n.so.60.2
133COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicui18n.so.60 /usr/lib/libicui18n.so.60
ss412g1a79bdf2019-10-24 12:03:05 +0300134
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200135COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib/libicuuc.so
136COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.60.2 /usr/lib/libicuuc.so.60.2
137COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicuuc.so.60 /usr/lib/libicuuc.so.60
ss412g1a79bdf2019-10-24 12:03:05 +0300138
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200139COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib/libicudata.so
140COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.60.2 /usr/lib/libicudata.so.60.2
141COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libicudata.so.60 /usr/lib/libicudata.so.60
ss412g1a79bdf2019-10-24 12:03:05 +0300142
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200143COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6
ss412g1a79bdf2019-10-24 12:03:05 +0300144
ss412g4aeeda22020-06-16 14:12:41 +0300145COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.5.0 /usr/lib/libcurl-gnutls.so.4.5.0
146COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 /usr/lib/libcurl-gnutls.so.4
147COPY --from=ubuntu /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so /usr/lib/libcurl-gnutls.so
148
Fuss, Areli (af732p)2ff35a72020-06-29 11:35:53 +0300149COPY --from=ubuntu /usr/local/bin/rmr_probe /opt/e2/rmr_probe
ss412g4aeeda22020-06-16 14:12:41 +0300150
ss412g1a79bdf2019-10-24 12:03:05 +0300151WORKDIR /opt/e2/
152ENV LD_LIBRARY_PATH=/usr/local/lib
153ENV RMR_SEED_RT=dockerRouter.txt
aa7133@att.coma8a819f2020-03-16 12:04:24 +0200154ENV E2TERM_POD_NAME=e2term
Fuss, Areli (af732p)2ff35a72020-06-29 11:35:53 +0300155RUN chmod +x /opt/e2/startup.sh /opt/e2/rmr_probe
ss412g1a79bdf2019-10-24 12:03:05 +0300156EXPOSE 38000
root8db75912020-01-23 17:11:52 +0000157CMD ["sh", "-c", "./startup.sh"]