Use "builder image" more appropriately
[ric-plt/a1.git] / Dockerfile
index be8d8da..4041aee 100644 (file)
 #   See the License for the specific language governing permissions and
 #   limitations under the License.
 # ==================================================================================
+# TODO: switch to alpine once rmr apk available
+FROM python:3.7
 
-# CI to build a Docker image with the A1 mediator
-# Adds gcc and cmake to build RMr library
 
-FROM python:3.7
+COPY . /tmp
+WORKDIR /tmp
 
-ADD . /tmp
+# copy NNG out of the  CI builder nng
+COPY --from=nexus3.o-ran-sc.org:10004/bldr-debian-python-nng:2-py3.7-nng1.1.1 /usr/local/lib/libnng.so /usr/local/lib/libnng.so
 
-# Install RMr
-RUN apt-get update && apt-get install -y gcc git cmake
-RUN git clone https://gerrit.oran-osc.org/r/ric-plt/lib/rmr
-WORKDIR rmr
-# This pins RMr to a known working version
-RUN git checkout 68d09fa5028e47e763c44c30647da31e77eda64a
-RUN mkdir .build; cd .build; cmake ..; make install
+# Installs RMr using debian package hosted at packagecloud.io
+RUN wget --content-disposition https://packagecloud.io/o-ran-sc/master/packages/debian/stretch/rmr_1.0.36_amd64.deb/download.deb
+RUN dpkg -i rmr_1.0.36_amd64.deb
 
-# Install python-rmr
+# Install RMr python bindings
 RUN pip install --upgrade pip
+RUN pip install rmr==0.10.1
 
-#install a1
-WORKDIR /tmp
+# install a1
 
-# Run our unit tests
+# Prereq for unit tests
 RUN pip install tox
 RUN tox