Merge "Initial docs skeleton"
[it/test.git] / ons_2019_demo / load_gen / Dockerfile
1 #\r
2 # Copyright 2019 AT&T Intellectual Property\r
3 # Copyright 2019 Nokia\r
4 #\r
5 # Licensed under the Apache License, Version 2.0 (the "License");\r
6 # you may not use this file except in compliance with the License.\r
7 # You may obtain a copy of the License at\r
8 #\r
9 #      http://www.apache.org/licenses/LICENSE-2.0\r
10 #\r
11 # Unless required by applicable law or agreed to in writing, software\r
12 # distributed under the License is distributed on an "AS IS" BASIS,\r
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 # See the License for the specific language governing permissions and\r
15 # limitations under the License.\r
16 #\r
17 \r
18 # sudo docker build -t load_gen .\r
19 # sudo docker run --rm -it load_gen\r
20 \r
21 FROM ubuntu:16.04\r
22 \r
23 # Install necessary packages\r
24 RUN apt-get update\r
25 RUN apt-get update && apt-get install -y gcc git make bash vim cmake g++ ksh\r
26 RUN apt-get install -y iputils-ping\r
27 \r
28 # Install rmr in /usr/local\r
29 WORKDIR /home\r
30 RUN git clone https://gerrit.oran-osc.org/r/ric-plt/lib/rmr\r
31 RUN date; ls -al /usr/local/lib\r
32 RUN cd rmr; git checkout 6735f136906ce2; mkdir .build; cd .build; cmake ..; make install\r
33 \r
34 # COPY code\r
35 RUN     mkdir /home/load_gen\r
36 COPY    ./ /home/load_gen\r
37 WORKDIR /home/load_gen\r
38 \r
39 # Configure the receiver\r
40 RUN mkdir /usr/local/route\r
41 ENV C_INCLUDE_PATH=/usr/local/include\r
42 ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib\r
43 \r
44 # local.rt should be in the /usr/local/route directory mounted from the outside world.\r
45 # example for command line:  -v /demo/test/route:/usr/local/route\r
46 ENV RMR_SEED_RT=/usr/local/route/local.rt\r
47 # export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt\r
48 \r
49 RUN gcc load_gen.c -g -o load_gen -L /usr/local/lib -lrmr_nng -lnng -lpthread -lm\r
50 \r
51 CMD ./load_gen\r