2 # Copyright 2019 AT&T Intellectual Property
\r
3 # Copyright 2019 Nokia
\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
9 # http://www.apache.org/licenses/LICENSE-2.0
\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
18 # sudo docker build -t load_consumer .
\r
19 # sudo docker run --rm -it load_consumer
\r
23 # Install necessary packages
\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
28 # Install rmr in /usr/local
\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
35 RUN mkdir /home/load_consumer
\r
36 COPY ./ /home/load_consumer
\r
37 WORKDIR /home/load_consumer
\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
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
49 RUN gcc dummy_rcvr.c -g -o dummy_rcvr -L /usr/local/lib -lrmr_nng -lnng -lpthread -lm
\r