diff options
author | Xiaohua Zhang <xiaohua.zhang@windriver.com> | 2019-03-04 08:09:18 +0000 |
---|---|---|
committer | Xiaohua Zhang <xiaohua.zhang@windriver.com> | 2019-03-04 08:09:18 +0000 |
commit | e179f48706ef7e26c5d0e450a408f5da8568cccd (patch) | |
tree | 741a9e83a756d61e4836af5d4df36801d6ea714d /windriver | |
parent | 03985a2977b3934330c171d9261045193beb2725 (diff) |
Optimize docker image footprint
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>
Diffstat (limited to 'windriver')
-rw-r--r-- | windriver/docker/Dockerfile | 6 | ||||
-rw-r--r-- | windriver/requirements.txt | 6 | ||||
-rw-r--r-- | windriver/test-requirements.txt | 5 |
3 files changed, 11 insertions, 6 deletions
diff --git a/windriver/docker/Dockerfile b/windriver/docker/Dockerfile index 376fa951..94ae4851 100644 --- a/windriver/docker/Dockerfile +++ b/windriver/docker/Dockerfile @@ -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 diff --git a/windriver/requirements.txt b/windriver/requirements.txt index 3196019c..fefde87b 100644 --- a/windriver/requirements.txt +++ b/windriver/requirements.txt @@ -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 diff --git a/windriver/test-requirements.txt b/windriver/test-requirements.txt index 97044b5c..cc3059e2 100644 --- a/windriver/test-requirements.txt +++ b/windriver/test-requirements.txt @@ -1 +1,6 @@ +# for unit test +coverage==4.2 +mock==2.0.0 +unittest_xml_reporting==1.12.0 + pylint # GPLv2 |