summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2019-04-10 13:12:47 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-10 13:12:47 +0000
commit9e0f9994c0cab7839f09816b7187b2cbd58ad877 (patch)
tree5b2df028f3b796c8e343455f9be2ea5b66547be6 /vio
parent9e7dbb68475dcc39e051dc14df91ed255088c4a5 (diff)
parentedbd90e0bb26038b397c3295c3844e6450254a70 (diff)
Merge "Use alpine for MultiCloud VIO plugin"
Diffstat (limited to 'vio')
-rw-r--r--vio/docker/Dockerfile11
-rwxr-xr-xvio/run.sh4
2 files changed, 7 insertions, 8 deletions
diff --git a/vio/docker/Dockerfile b/vio/docker/Dockerfile
index b035fc6..1fd4eca 100644
--- a/vio/docker/Dockerfile
+++ b/vio/docker/Dockerfile
@@ -1,4 +1,4 @@
-FROM python:2-slim
+FROM python:2-alpine
ENV MSB_ADDR "127.0.0.1"
ENV MSB_PORT "80"
@@ -12,10 +12,10 @@ ENV MR_PORT "3904"
EXPOSE 9004
-RUN groupadd -r onap && useradd -r -g onap onap
+RUN addgroup -S onap && adduser -S -G onap onap
-RUN apt-get update && \
- apt-get install -y unzip wget curl gcc libssl-dev && \
+RUN apk update && \
+ apk add uwsgi unzip wget curl gcc make libc-dev libffi-dev openssl-dev && \
cd /opt/ && \
wget -q -O multicloud-vio.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack.vmware&a=multicloud-openstack-vmware&v=1.3.0-SNAPSHOT&e=zip' && \
unzip multicloud-vio.zip && \
@@ -24,8 +24,7 @@ RUN apt-get update && \
mkdir -p /var/log/onap/multicloud/vio && \
chmod a+rw /var/log/onap/multicloud/vio && \
chown onap:onap -R /opt/vio/ && \
- apt-get --purge remove -y unzip gcc && \
- apt-get -y autoremove
+ apk del -y unzip gcc make libc-dev libffi-dev openssl-dev
USER onap
diff --git a/vio/run.sh b/vio/run.sh
index 0a19cd5..1f08d71 100755
--- a/vio/run.sh
+++ b/vio/run.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (c) 2017-2018 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -32,7 +32,7 @@ then
python multivimbroker/scripts/api.py
else
# nohup python manage.py runserver 0.0.0.0:9004 2>&1 &
- if [ ${SSL_ENABLED} = "true" ]; then
+ if [ "${SSL_ENABLED}" == "true" ]; then
nohup uwsgi --https :9004,/opt/vio/cert.crt,/opt/vio/cert.key --module vio.wsgi --master --processes 4 &
else