# 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
-# Relies on NNG from base image
-# Installs RMr using debian package hosted at packagecloud.io
-
-FROM nexus3.o-ran-sc.org:10004/bldr-debian-python-nng:2-py3.7-nng1.1.1
COPY . /tmp
WORKDIR /tmp
-# Install RMr library
+# 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
+
+# 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
# See the License for the specific language governing permissions and
# limitations under the License.
# ==================================================================================
-
-FROM nexus3.o-ran-sc.org:10004/bldr-debian-python-nng:2-py3.7-nng1.1.1
+# TODO: switch to alpine once rmr apk available
+FROM python:3.7
COPY receiver.py /
-# Install RMr
-RUN wget --content-disposition https://packagecloud.io/o-ran-sc/master/packages/debian/stretch/rmr_1.0.34_amd64.deb/download.deb
-RUN dpkg -i rmr_1.0.34_amd64.deb
+# 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
+
+# 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 RMr python bindings
RUN pip install --upgrade pip
# See the License for the specific language governing permissions and
# limitations under the License.
# ==================================================================================
-
-FROM nexus3.o-ran-sc.org:10004/bldr-debian-python-nng:2-py3.7-nng1.1.1
+# TODO: switch to alpine once rmr apk available
+FROM python3.7
COPY bombard.py /
-# Install RMr
-RUN wget --content-disposition https://packagecloud.io/o-ran-sc/master/packages/debian/stretch/rmr_1.0.34_amd64.deb/download.deb
-RUN dpkg -i rmr_1.0.34_amd64.deb
+# 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
+
+# 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 RMr python bindings
RUN pip install --upgrade pip