# the builder has: git, wget, cmake, gcc/g++, make, python2/3. v7 dropped nng support
#
-FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as buildenv
+FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.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
WORKDIR /playpen
# versions we snarf from package cloud
-ARG RMR_VER=4.7.4
-# ARG SDL_VER=1.0.4
-ARG XFCPP_VER=2.3.3
+ARG RMR_VER=4.8.1
+# ARG SDL_VER=1.4.0
+ARG XFCPP_VER=2.3.6
# package cloud urls for wget
ARG PC_REL_URL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch
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 &&\
+# RUN apt-get update && apt-get install -y \
+# libboost-filesystem1.67.0 \
+# libboost-system1.67.0 \
+# libhiredis-dev \
+# libhiredis0.14 \
+# && apt-get clean
+# RUN wget -nv --content-disposition ${PC_REL_URL}/sdl_${SDL_VER}-1_amd64.deb/download.deb && \
+# wget -nv --content-disposition ${PC_REL_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 build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
make install && \
- cd ${STAGE_DIR} && \
+ cd ../../ && \
rm -rf rapidjson
-# install TS curl dependencies
-RUN apt-get update && \
- apt-get install -y libcurl4-openssl-dev
+# install curl and gRPC dependencies
+RUN apt-get update && apt-get install -y \
+ libcurl4-openssl-dev \
+ libprotobuf-dev \
+ libgrpc++-dev
#
# build and install the application(s)
# ----- create final, smaller, image ----------------------------------
-FROM ubuntu:18.04
+FROM ubuntu:20.04
# # package cloud urls for wget
# ARG PC_REL_URL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch
# # 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 &&\
+# RUN apt-get update && apt-get install -y \
+# libboost-filesystem1.67.0 \
+# libboost-system1.67.0 \
+# libhiredis-dev \
+# libhiredis0.14 \
+# && apt-get clean
+# RUN wget -nv --content-disposition ${PC_REL_URL}/sdl_${SDL_VER}-1_amd64.deb/download.deb && \
+# wget -nv --content-disposition ${PC_REL_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
-# install TS curl dependencies in the final image
-RUN apt-get update && \
- apt-get install -y libcurl4-openssl-dev && \
- apt-get clean
+# install curl and gRPC dependencies in the final image
+RUN apt-get update && apt-get install -y \
+ libcurl4-openssl-dev \
+ libprotobuf-dev \
+ libgrpc++-dev && \
+ rm -rf /var/lib/apt/lists/*
+
# snarf the various sdl, rmr, and cpp-framework libraries as well as any binaries
# created (e.g. rmr_rprobe) and the application binary itself
ENV RMR_SEED_RT=/data/bootstrap.rt
#ENV RMR_RTG_SVC=rm-host:port
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
+# ENV RMR_VCTL_FILE=/tmp/rmr.v
+# RUN echo "2" >/tmp/rmr.v
CMD [ "/usr/local/bin/ts_xapp" ]