Rebase image to alpine 56/85156/1
authorXiaohua Zhang <xiaohua.zhang@windriver.com>
Fri, 12 Apr 2019 07:33:53 +0000 (07:33 +0000)
committerXiaohua Zhang <xiaohua.zhang@windriver.com>
Fri, 12 Apr 2019 07:33:53 +0000 (07:33 +0000)
Change-Id: I349e54dbfdb25e543312554c82c9339a39cd8817
Issue-ID: MULTICLOUD-508
Signed-off-by: Xiaohua Zhang <xiaohua.zhang@windriver.com>
windriver/docker/Dockerfile
windriver/run.sh
windriver/stop.sh

index f4e151f..cd58bd7 100644 (file)
@@ -1,4 +1,4 @@
-FROM python:2-slim
+FROM python:2-alpine
 
 ARG HTTP_PROXY=${HTTP_PROXY}
 ARG HTTPS_PROXY=${HTTPS_PROXY}
@@ -16,19 +16,18 @@ ENV AAI_PASSWORD "AAI"
 
 EXPOSE 9005
 
-RUN groupadd -r onap && useradd -r -g onap onap
+RUN addgroup -S onap && adduser -S -G onap onap
 # COPY ./ /opt/windriver/
 
-RUN apt-get update && \
-    apt-get install -y memcached wget unzip gcc libssl-dev && \
+RUN apk update && \
+    apk add uwsgi memcached wget unzip gcc make libc-dev libffi-dev openssl-dev && \
     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 --purge remove -y wget unzip gcc libssl-dev && \
-    apt-get -y autoremove && \
+    apk del -y wget unzip gcc make libc-dev libffi-dev openssl-dev && \
     mkdir -p /var/log/onap/multicloud/openstack/windriver && \
     chown onap:onap /var/log/onap -R && \
     chown onap:onap /opt/windriver -R
index 650c2c1..c65ecdf 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # Copyright (c) 2017-2018 Wind River Systems, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,7 +18,7 @@ export PYTHONPATH=lib/share
 
 #nohup python manage.py runserver 0.0.0.0:9005 2>&1 &
 
-if [ ${SSL_ENABLED} = "true" ]; then
+if [ "${SSL_ENABLED}" = "true" ]; then
     nohup uwsgi --https :9005,titanium_cloud/pub/ssl/cert/cert.crt,titanium_cloud/pub/ssl/cert/cert.key,HIGH --module titanium_cloud.wsgi --master --enable-threads --processes 4 &
 
 else
index 5e7a6ac..882fb74 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # Copyright (c) 2017-2018 Wind River Systems, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");