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