Optimize docker image footprint 86/79586/1
authorXiaohua Zhang <xiaohua.zhang@windriver.com>
Mon, 4 Mar 2019 08:09:18 +0000 (08:09 +0000)
committerXiaohua Zhang <xiaohua.zhang@windriver.com>
Mon, 4 Mar 2019 08:09:18 +0000 (08:09 +0000)
Rebase to python:2-slim
Remove unused pip packages

Change-Id: I07c544debe93128bdd4722797339af708d246f0f
Issue-ID: MULTICLOUD-508
Signed-off-by: Xiaohua Zhang <xiaohua.zhang@windriver.com>
windriver/docker/Dockerfile
windriver/requirements.txt
windriver/test-requirements.txt

index 376fa95..94ae485 100644 (file)
@@ -1,4 +1,4 @@
-FROM python:2
+FROM python:2-slim
 
 ARG HTTP_PROXY=${HTTP_PROXY}
 ARG HTTPS_PROXY=${HTTPS_PROXY}
@@ -20,14 +20,14 @@ RUN groupadd -r onap && useradd -r -g onap onap
 # COPY ./ /opt/windriver/
 
 RUN apt-get update && \
-    apt-get install -y memcached && \
-    apt-get install -y unzip && \
+    apt-get install -y memcached unzip gcc && \
     cd /opt/ && \
     wget -O multicloud-openstack-windriver.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack&a=multicloud-openstack-windriver&e=zip&v=1.3.0-SNAPSHOT" && \
     unzip -q -o -B multicloud-openstack-windriver.zip && \
     chmod +x /opt/windriver/*.sh && \
     rm -f multicloud-openstack-windriver.zip && \
     pip install -r /opt/windriver/requirements.txt && \
+    apt-get remove -y unzip gcc && \
     chown onap:onap /opt/windriver -R
 
 USER onap
index 3196019..fefde87 100644 (file)
@@ -15,9 +15,9 @@ python-memcached
 uwsgi
 
 # for unit test
-coverage==4.2
-mock==2.0.0
-unittest_xml_reporting==1.12.0
+coverage==4.2
+mock==2.0.0
+unittest_xml_reporting==1.12.0
 
 # for onap logging
 onappylog>=1.0.8
index 97044b5..cc3059e 100644 (file)
@@ -1 +1,6 @@
+# for unit test
+coverage==4.2
+mock==2.0.0
+unittest_xml_reporting==1.12.0
+
 pylint # GPLv2