X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=mc-core%2FDockerfile;h=d2fbbb05bc496fd3f3df6ce971236fe62d1595ca;hb=783f6bfa93c3eed4787bded3c35016952b74b2e3;hp=a88b1466aa4a548efbe855bac660a1db2dcb0a46;hpb=1263ce3959bccb268fc4a22c57937166e03f8009;p=ric-app%2Fmc.git diff --git a/mc-core/Dockerfile b/mc-core/Dockerfile index a88b146..d2fbbb0 100644 --- a/mc-core/Dockerfile +++ b/mc-core/Dockerfile @@ -16,7 +16,7 @@ ARG STAGE_DIR=/mc -FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu16-c-go:2-u16.04-nng AS project-build +FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu18-c-go:4-u18.04-nng AS project-build # Update & installation of linux packages RUN apt-get update -y && \ apt-get install -y curl && \ @@ -27,6 +27,15 @@ ARG STAGE_DIR COPY mc ${STAGE_DIR} WORKDIR ${STAGE_DIR} +RUN apt-get install -y libboost-all-dev +RUN apt-get install -y libhiredis-dev +RUN git clone https://gerrit.o-ran-sc.org/r/ric-plt/sdl +WORKDIR ${STAGE_DIR}/sdl +RUN ./autogen.sh +RUN ./configure +RUN make all +RUN make install +WORKDIR ${STAGE_DIR} RUN git clone https://github.com/protocolbuffers/protobuf.git WORKDIR ${STAGE_DIR}/protobuf RUN ./autogen.sh @@ -52,32 +61,41 @@ COPY mc/cfg ${STAGE_DIR}/gs-lite/cfg COPY mc/local_datasource ${STAGE_DIR}/gs-lite/src/lib/gscprts/local_datasource COPY mc/local ${STAGE_DIR}/gs-lite/include/lfta/local COPY mc/queries ${STAGE_DIR}/gs-lite/demo/queries +COPY mc/mcnib/* ${STAGE_DIR}/gs-lite/src/tools/ RUN ./build_and_install.sh WORKDIR ${STAGE_DIR}/gs-lite/demo/queries ENV GSLITE_ROOT ${STAGE_DIR}/gs-lite RUN bash ${STAGE_DIR}/gs-lite/bin/buildit +RUN python generate_runall.py # now install the binaries and libraries into smaller docker image -FROM ubuntu:16.04 +FROM nexus3.o-ran-sc.org:10004/o-ran-sc/ric-app-mc-listener:1.4.0 ARG STAGE_DIR COPY --from=project-build ${STAGE_DIR}/gs-lite/demo/queries /mc/gs-lite/demo/queries COPY --from=project-build ${STAGE_DIR}/gs-lite/bin /mc/gs-lite/bin COPY --from=project-build ${STAGE_DIR}/data_gen /mc/data_gen -COPY --from=project-build ${STAGE_DIR}/mc_deployment.json /mc/ COPY --from=project-build ${STAGE_DIR}/extract_params.py /mc/ COPY --from=project-build /usr/local/lib/libproto* /usr/local/lib/ +COPY --from=project-build /usr/local/lib/libsdl* /usr/local/lib/ + +WORKDIR /opt/ric/config +COPY --from=project-build ${STAGE_DIR}/mc_deployment.json /opt/ric/config/config-file.json + +COPY container_start.sh /playpen/bin/ RUN apt-get update && \ - apt-get install -y curl python python-pip && \ + apt-get install -y curl python python-pip libboost-all-dev libhiredis-dev \ + redis-tools && \ apt-get clean RUN ldconfig RUN pip install protobuf -ENV XAPP_DESCRIPTOR_PATH /mc/mc_deployment.json -WORKDIR /mc/gs-lite/demo/queries +ENV XAPP_DESCRIPTOR_PATH /opt/ric/config/ +WORKDIR /playpen ENV GSLITE_ROOT /mc/gs-lite -CMD ["./runall"] + +CMD ["/playpen/bin/container_start.sh"]