Remove all old PI3 ASN files in first step because of change is too large
[ric-plt/e2.git] / RIC-E2-TERMINATION / TEST / T2 / 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 snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2_base:1.0.0 as ubuntu
24
25 WORKDIR /opt/e2/
26 RUN mkdir -p /opt/e2/RIC-E2-TERMINATION/ \
27     && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T1 \
28     && mkdir -p /opt/e2/RIC-E2-TERMINATION/TEST/T2
29 COPY . /opt/e2/RIC-E2-TERMINATION/
30 RUN mv /opt/e2/RIC-E2-TERMINATION/CMakeLists.txt /opt/e2/
31
32 RUN echo "137.135.91.204 gerrit.ranco-dev-tools.eastus.cloudapp.azure.com" >> /etc/hosts \
33     && apt-get install -y autoconf gawk libtool automake pkg-config autoconf-archive \
34     && git clone http://gerrit.ranco-dev-tools.eastus.cloudapp.azure.com/com/log \
35     && cd log \
36     && ./autogen.sh && ./configure && make && make install && ldconfig
37
38 RUN  git clone https://gerrit.o-ran-sc.org/r/ric-plt/lib/rmr \
39      && cd rmr/; mkdir build; cd build; /opt/bin/cmake -DDEV_PKG=1 ..; make install \
40      && cd /opt/e2/ && /opt/bin/cmake . && make
41
42 FROM ubuntu:16.04
43 COPY --from=ubuntu /opt/e2/subscriptionTest /opt/e2/subscriptionTest
44 COPY --from=ubuntu /opt/e2/RIC-E2-TERMINATION/TEST/T2/dockerRouter.txt /opt/e2/dockerRouter.txt
45 COPY --from=ubuntu /usr/local/lib/librmr_nng.so.1 /usr/local/lib/librmr_nng.so.1
46 COPY --from=ubuntu /usr/local/lib/libnng.so.1 /usr/local/lib/libnng.so.1
47 COPY --from=ubuntu /usr/local/lib/libmdclog.so.0 /usr/local/lib/libmdclog.so.0
48
49 WORKDIR /opt/e2/
50 ENV LD_LIBRARY_PATH=/usr/local/lib
51 #ENV RMR_RTG_SVC=127.0.0.1
52 ENV RMR_SEED_RT=dockerRouter.txt
53 ENV ran=ranname
54 ENV rmr=38010
55 ENV loglevel=info
56 EXPOSE 38010
57 CMD ["sh", "-c", "./subscriptionTest ran $ran rmr $rmr loglevel $loglevel" ]