Modify M-Cloud lenovo thinkcloud Dockerfile 61/79761/1
authorChangjun Wang <310397125@qq.com>
Wed, 6 Mar 2019 07:39:00 +0000 (07:39 +0000)
committerChangjun Wang <310397125@qq.com>
Wed, 6 Mar 2019 08:47:58 +0000 (08:47 +0000)
Modify Python2.7 to python2.7-slim

Issue-ID: MULTICLOUD-516

Change-Id: Ic3d5cfb4e467652aa6e0a6ad340351998460b0b4
Signed-off-by: Changjun Wang <310397125@qq.com>
lenovo/docker/Dockerfile

index 5660e8e..2a61912 100644 (file)
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM python:2.7
+FROM python:2.7-slim
 
 ARG HTTP_PROXY=${HTTP_PROXY}
 ARG HTTPS_PROXY=${HTTPS_PROXY}
@@ -33,15 +33,16 @@ EXPOSE 9010
 
 RUN groupadd -r onap && useradd -r -g onap onap
 
-RUN apt-get update && apt-get install -y memcached unzip gcc && \
+RUN apt-get update && apt-get install -y memcached wget unzip gcc && \
     cd /opt/ && \
-       wget -O multicloud-openstack-thinkcloud.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack&a=multicloud-openstack-thinkcloud&e=zip&v=1.3.0-SNAPSHOT" && \
+    wget -O multicloud-openstack-thinkcloud.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack&a=multicloud-openstack-lenovo&e=zip&v=1.3.0-SNAPSHOT" && \
     unzip -q -o -B multicloud-openstack-thinkcloud.zip && \
-       chmod +x /opt/thinkcloud/*.sh &&\
+    chmod +x /opt/thinkcloud/*.sh &&\
     rm -f multicloud-openstack-thinkcloud.zip &&\
-       pip install -r /opt/thinkcloud/requirements.txt &&\
-       apt-get remove -y unzip gcc && \
-       chown onap:onap /opt/thinkcloud -R
+    pip install -r /opt/thinkcloud/requirements.txt &&\
+    apt-get --purge remove -y wget unzip gcc && \
+    apt-get -y autoremove && \
+    chown onap:onap /opt/thinkcloud -R
 
 USER onap