X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=Dockerfile;h=f443bbb5cb9fb6ba8fa7770bb006b9dcc79844ee;hb=b86721b7806e95d07e96cc52bdc7a979ec3dd2f2;hp=a1cc537a00d2116b453427c245b7781bf0fbe05d;hpb=d846166903e6508eed9848aaa47e6e563ecdf436;p=ric-app%2Fts.git diff --git a/Dockerfile b/Dockerfile index a1cc537..f443bbb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ # # Building should be as simple as: # -# docker build -f Dockerfile -t ric-app-ts:[version] +# docker build -f Dockerfile -t ric-app-ts:[version] . # # Date: 27 April 2020 # Author: E. Scott Daniels @@ -31,7 +31,7 @@ # the builder has: git, wget, cmake, gcc/g++, make, python2/3. v7 dropped nng support # -FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as buildenv +FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as buildenv # spaces to save things in the build image to copy to final image RUN mkdir -p /playpen/assets /playpen/src /playpen/bin @@ -40,13 +40,13 @@ ARG SRC=. WORKDIR /playpen # versions we snarf from package cloud -ARG RMR_VER=4.0.5 -ARG SDL_VER=1.0.4 -ARG XFCPP_VER=1.2.0 +ARG RMR_VER=4.7.4 +# ARG SDL_VER=1.0.4 +ARG XFCPP_VER=2.3.3 # package cloud urls for wget ARG PC_REL_URL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch -ARG PC_STG_URL=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch +# ARG PC_STG_URL=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch # pull in rmr RUN wget -nv --content-disposition ${PC_REL_URL}/rmr_${RMR_VER}_amd64.deb/download.deb && \ @@ -54,16 +54,16 @@ RUN wget -nv --content-disposition ${PC_REL_URL}/rmr_${RMR_VER}_amd64.deb/downlo dpkg -i rmr_${RMR_VER}_amd64.deb rmr-dev_${RMR_VER}_amd64.deb # pull in xapp framework c++ -RUN wget -nv --content-disposition ${PC_STG_URL}/ricxfcpp-dev_${XFCPP_VER}_amd64.deb/download.deb && \ - wget -nv --content-disposition ${PC_STG_URL}/ricxfcpp_${XFCPP_VER}_amd64.deb/download.deb && \ +RUN wget -nv --content-disposition ${PC_REL_URL}/ricxfcpp-dev_${XFCPP_VER}_amd64.deb/download.deb && \ + wget -nv --content-disposition ${PC_REL_URL}/ricxfcpp_${XFCPP_VER}_amd64.deb/download.deb && \ dpkg -i ricxfcpp-dev_${XFCPP_VER}_amd64.deb ricxfcpp_${XFCPP_VER}_amd64.deb -# snarf up SDL dependencies, then pull SDL package and install -RUN apt-get update -RUN apt-get install -y libboost-filesystem1.65.1 libboost-system1.65.1 libhiredis0.13 -RUN wget -nv --content-disposition ${PC_STG_URL}/sdl_${SDL_VER}-1_amd64.deb/download.deb && \ - wget -nv --content-disposition ${PC_STG_URL}/sdl-dev_${SDL_VER}-1_amd64.deb/download.deb &&\ - dpkg -i sdl-dev_${SDL_VER}-1_amd64.deb sdl_${SDL_VER}-1_amd64.deb +# # snarf up SDL dependencies, then pull SDL package and install +# RUN apt-get update +# RUN apt-get install -y libboost-filesystem1.65.1 libboost-system1.65.1 libhiredis0.13 +# RUN wget -nv --content-disposition ${PC_STG_URL}/sdl_${SDL_VER}-1_amd64.deb/download.deb && \ +# wget -nv --content-disposition ${PC_STG_URL}/sdl-dev_${SDL_VER}-1_amd64.deb/download.deb &&\ +# dpkg -i sdl-dev_${SDL_VER}-1_amd64.deb sdl_${SDL_VER}-1_amd64.deb RUN git clone https://github.com/Tencent/rapidjson && \ cd rapidjson && \ @@ -74,7 +74,9 @@ RUN git clone https://github.com/Tencent/rapidjson && \ cd ${STAGE_DIR} && \ rm -rf rapidjson - +# install TS curl dependencies +RUN apt-get update && \ + apt-get install -y libcurl4-openssl-dev # # build and install the application(s) @@ -99,20 +101,25 @@ COPY assets/bootstrap.rt /playpen/assets # ----- create final, smaller, image ---------------------------------- FROM ubuntu:18.04 -# package cloud urls for wget -ARG PC_REL_URL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch -ARG PC_STG_URL=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch -ARG SDL_VER=1.0.4 +# # package cloud urls for wget +# ARG PC_REL_URL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch +# ARG PC_STG_URL=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch +# ARG SDL_VER=1.0.4 -# sdl doesn't install into /usr/local like everybody else, and we don't want to -# hunt for it or copy all of /usr, so we must pull and reinstall it. -RUN apt-get update -RUN apt-get install -y libboost-filesystem1.65.1 libboost-system1.65.1 libhiredis0.13 wget -RUN wget -nv --content-disposition ${PC_STG_URL}/sdl_${SDL_VER}-1_amd64.deb/download.deb && \ - wget -nv --content-disposition ${PC_STG_URL}/sdl-dev_${SDL_VER}-1_amd64.deb/download.deb &&\ - dpkg -i sdl-dev_${SDL_VER}-1_amd64.deb sdl_${SDL_VER}-1_amd64.deb +# # sdl doesn't install into /usr/local like everybody else, and we don't want to +# # hunt for it or copy all of /usr, so we must pull and reinstall it. +# RUN apt-get update +# RUN apt-get install -y libboost-filesystem1.65.1 libboost-system1.65.1 libhiredis0.13 wget +# RUN wget -nv --content-disposition ${PC_STG_URL}/sdl_${SDL_VER}-1_amd64.deb/download.deb && \ +# wget -nv --content-disposition ${PC_STG_URL}/sdl-dev_${SDL_VER}-1_amd64.deb/download.deb &&\ +# dpkg -i sdl-dev_${SDL_VER}-1_amd64.deb sdl_${SDL_VER}-1_amd64.deb -RUN rm -fr /var/lib/apt/lists +# RUN rm -fr /var/lib/apt/lists + +# install TS curl dependencies in the final image +RUN apt-get update && \ + apt-get install -y libcurl4-openssl-dev && \ + apt-get clean # snarf the various sdl, rmr, and cpp-framework libraries as well as any binaries # created (e.g. rmr_rprobe) and the application binary itself @@ -136,4 +143,7 @@ ENV RMR_SRC_ID=service-ricxapp-trafficxapp-rmr.ricxapp:4560 ENV RMR_VCTL_FILE=/tmp/rmr.v RUN echo "2" >/tmp/rmr.v +# set TS env vars +ENV TS_CONTROL_URL=http://localhost:5000/api/echo + CMD [ "/usr/local/bin/ts_xapp" ]