Use "builder image" more appropriately 99/399/1
authorTommy Carpenter <tommy@research.att.com>
Fri, 21 Jun 2019 14:15:15 +0000 (10:15 -0400)
committerTommy Carpenter <tommy@research.att.com>
Fri, 21 Jun 2019 14:15:43 +0000 (10:15 -0400)
Change-Id: I6a9c00fd63a1a87ddf42daa36793c114ebe13a04
Signed-off-by: Tommy Carpenter <tommy@research.att.com>
Dockerfile
integration_tests/Dockerfile
integration_tests/Dockerfile-Bombard

index c990787..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
-# 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
 
index 321c729..fc912b4 100644 (file)
 #   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
index 840052f..d18a649 100644 (file)
 #   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