From 3eeee0df227d23e2a76b49cd4bbbcd8ff2733a05 Mon Sep 17 00:00:00 2001 From: Tommy Carpenter Date: Fri, 21 Jun 2019 10:15:15 -0400 Subject: [PATCH] Use "builder image" more appropriately Change-Id: I6a9c00fd63a1a87ddf42daa36793c114ebe13a04 Signed-off-by: Tommy Carpenter --- Dockerfile | 12 ++++++------ integration_tests/Dockerfile | 13 ++++++++----- integration_tests/Dockerfile-Bombard | 13 ++++++++----- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index c990787..4041aee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,17 +14,17 @@ # 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 diff --git a/integration_tests/Dockerfile b/integration_tests/Dockerfile index 321c729..fc912b4 100644 --- a/integration_tests/Dockerfile +++ b/integration_tests/Dockerfile @@ -14,14 +14,17 @@ # 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 diff --git a/integration_tests/Dockerfile-Bombard b/integration_tests/Dockerfile-Bombard index 840052f..d18a649 100644 --- a/integration_tests/Dockerfile-Bombard +++ b/integration_tests/Dockerfile-Bombard @@ -14,14 +14,17 @@ # 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 -- 2.16.6