From 488447aed60cc52b06d71d50bee4ecf10025f7e1 Mon Sep 17 00:00:00 2001 From: sandeepindia Date: Fri, 22 Apr 2022 22:58:51 +0530 Subject: [PATCH] ISSUE ID:- RIC-890 Changed base image in dockerfile ISSUE ID :- RIC-891 modified the sequence of unit test in dockerfile. ISSUE ID:-892 Now copying the entire content as git repo inside container, inorder to fetch submodule jsmn. Signed-off-by: sandeepindia Change-Id: I11feb554743e7203f758bb92b4a5e643a574d286 --- Dockerfile | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7760f56..7cee0fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ # -------------------------------------------------------------------------------------- -FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu18-c-go:4-u18.04-nng as buildenv +FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.0 as buildenv RUN mkdir /playpen RUN apt-get update && apt-get install -y cmake gcc make git g++ wget @@ -58,16 +58,14 @@ ARG RMR_VER=4.8.0 COPY ${SRC}/build_rmr.sh /playpen/bin RUN bash /playpen/bin/build_rmr.sh -t ${RMR_VER} -COPY ${SRC}/CMakeLists.txt /playpen/factory/ -COPY ${SRC}/src /playpen/factory/src/ -COPY ${SRC}/test /playpen/factory/test/ + +#copy the content as git repo inside the container. +#COPY ${SRC}/CMakeLists.txt /playpen/factory/ +#COPY ${SRC}/src /playpen/factory/src/ +#COPY ${SRC}/test /playpen/factory/test/ COPY ${SRC}/examples /tmp/examples/ +COPY . /playpen/factory -# -# Run unit tests -# -COPY ${SRC}/test/* /playpen/factory/test/ -RUN cd /playpen/factory/test; bash unit_test.sh # Go to the factory and build our stuff # @@ -76,8 +74,17 @@ ENV C_INCLUDE_PATH=/usr/local/include RUN cd /playpen/factory; rm -fr .build; mkdir .build; cd .build; cmake .. -DDEV_PKG=1; make install; cmake .. -DDEV_PKG=0; make install + + +# +# Run unit tests will come after building process +# +COPY ${SRC}/test/* /playpen/factory/test/ +RUN cd /playpen/factory/test; bash unit_test.sh + + # ----- final, smaller image ---------------------------------- -FROM ubuntu:18.04 +FROM ubuntu:20.04 # must add compile tools to make it a builder environmnent. If a build environment isn't needed # comment out the next line and reduce the image size by more than 180M. -- 2.16.6