1 # -------------------------------------------------------------------------------
2 # Copyright (c) 2018-2019 AT&T Intellectual Property.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # -------------------------------------------------------------------------------
19 FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu18-c-go:7-u18.04 AS project-build
25 RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_${RMR_VER}_amd64.deb/download.deb
26 RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_${RMR_VER}_amd64.deb/download.deb
27 RUN dpkg -i rmr_${RMR_VER}_amd64.deb
28 RUN dpkg -i rmr-dev_${RMR_VER}_amd64.deb
33 RUN apt-get install -y libboost-all-dev
34 RUN apt-get install -y libhiredis-dev
35 RUN git clone https://gerrit.o-ran-sc.org/r/ric-plt/sdl
36 WORKDIR ${STAGE_DIR}/sdl
42 RUN git clone https://github.com/protocolbuffers/protobuf.git
43 WORKDIR ${STAGE_DIR}/protobuf
51 RUN git clone https://github.com/protobuf-c/protobuf-c.git
54 ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
60 RUN git clone -b release/0.1.0 https://gerrit.o-ran-sc.org/r/com/gs-lite
61 WORKDIR ${STAGE_DIR}/gs-lite
62 COPY mc/cfg ${STAGE_DIR}/gs-lite/cfg
63 COPY mc/local_datasource ${STAGE_DIR}/gs-lite/src/lib/gscprts/local_datasource
64 COPY mc/local ${STAGE_DIR}/gs-lite/include/lfta/local
65 COPY mc/queries ${STAGE_DIR}/gs-lite/demo/queries
66 COPY mc/mcnib/* ${STAGE_DIR}/gs-lite/src/tools/
67 RUN ./build_and_install.sh
68 WORKDIR ${STAGE_DIR}/gs-lite/demo/queries
69 ENV GSLITE_ROOT ${STAGE_DIR}/gs-lite
70 RUN bash ${STAGE_DIR}/gs-lite/bin/buildit
71 RUN python generate_runall.py
74 # now install the binaries and libraries into smaller docker image
75 FROM nexus3.o-ran-sc.org:10004/o-ran-sc/ric-app-mc-listener:1.5.0
79 COPY --from=project-build ${STAGE_DIR}/gs-lite/demo/queries /mc/gs-lite/demo/queries
80 COPY --from=project-build ${STAGE_DIR}/gs-lite/bin /mc/gs-lite/bin
81 COPY --from=project-build ${STAGE_DIR}/data_gen /mc/data_gen
82 COPY --from=project-build ${STAGE_DIR}/extract_params.py /mc/
83 COPY --from=project-build ${STAGE_DIR}/extract_rmr_port.py /mc/
84 COPY --from=project-build /usr/local/lib/libproto* /usr/local/lib/
85 COPY --from=project-build /usr/local/lib/libsdl* /usr/local/lib/
87 WORKDIR /opt/ric/config
88 COPY --from=project-build ${STAGE_DIR}/mc_deployment.json /opt/ric/config/config-file.json
90 COPY container_start.sh /playpen/bin/
92 RUN apt-get update && \
93 apt-get install -y curl python python-pip libboost-all-dev libhiredis-dev && \
97 RUN pip install protobuf
99 ENV XAPP_DESCRIPTOR_PATH /opt/ric/config/
101 ENV GSLITE_ROOT /mc/gs-lite
103 CMD ["/playpen/bin/container_start.sh"]