Fixed up issues with last commit
[sim/e2-interface.git] / e2sim / e2sm_examples / kpm_e2sm / Dockerfile
1 # vim: ts=4 sw=4 noet:
2 #==================================================================================
3 #       Copyright (c) 2018-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 # --------------------------------------------------------------------------------------
20 #       Mnemonic:       Dockerfile
21 #       Abstract:       This dockerfile is used to create an image that can be used to
22 #                               run the traffic steering xAPP in a container.
23 #
24 #                               Building should be as simple as:
25 #
26 #                                       docker build -f Dockerfile -t ric-app-ts:[version]
27 #
28 #       Date:           27 April 2020
29 #       Author:         E. Scott Daniels
30 # --------------------------------------------------------------------------------------
31
32 # the builder has: git, wget, cmake, gcc/g++, make, python2/3. v7 dropped nng support
33 #
34 FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:8-u18.04 as buildenv
35
36 # spaces to save things in the build image to copy to final image
37 RUN mkdir -p /playpen/assets /playpen/src /playpen/bin
38 ARG SRC=.
39
40 WORKDIR /playpen
41
42 # versions we snarf from package cloud
43 ARG E2SIM_VER=1.0.0
44
45 # package cloud urls for wget
46 #ARG PC_REL_URL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch
47 #ARG PC_STG_URL=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch
48
49
50 # snarf up E2SIM dependencies, then pull E2SIM package and install
51 # Dependencies: sctp
52
53 RUN apt-get update \
54         && apt-get install -y \
55         build-essential \
56         git \
57         cmake \
58         libsctp-dev \
59         lksctp-tools \
60         autoconf \
61         automake \
62         libtool \
63         bison \
64         flex \
65   libboost-all-dev \
66         iputils-ping \
67         net-tools \
68         nano \
69         vim \
70         tcpdump \
71         net-tools \
72         nmap \
73   && apt-get clean
74
75
76 #RUN wget -nv --content-disposition ${PC_STG_URL}/sdl_${SDL_VER}-1_amd64.deb/download.deb && \
77 #       wget -nv --content-disposition ${PC_STG_URL}/sdl-dev_${SDL_VER}-1_amd64.deb/download.deb &&\
78 #       dpkg -i sdl-dev_${SDL_VER}-1_amd64.deb sdl_${SDL_VER}-1_amd64.deb
79
80 #
81 # build and install the application(s)
82 #
83
84
85 COPY e2sim_1.0.0_amd64.deb /playpen
86 COPY e2sim-dev_1.0.0_amd64.deb /playpen
87
88 RUN dpkg -i e2sim_1.0.0_amd64.deb e2sim-dev_1.0.0_amd64.deb
89
90
91 RUN mkdir /usr/local/include/nlohmann
92 RUN git clone https://github.com/azadkuh/nlohmann_json_release.git
93 RUN cp nlohmann_json_release/json.hpp /usr/local/include/nlohmann
94
95 COPY . /playpen/src/
96 RUN cd /playpen/src && \
97         rm -fr .build &&\
98         mkdir  .build && \
99         cd .build && \
100         cmake .. && \
101         make install
102
103
104 CMD kpm_sim 10.98.179.210 36422