diff options
author | Xiaohua Zhang <xiaohua.zhang@windriver.com> | 2019-04-12 07:33:53 +0000 |
---|---|---|
committer | Xiaohua Zhang <xiaohua.zhang@windriver.com> | 2019-04-12 07:33:53 +0000 |
commit | 0dd8bf5a0fa7d43fd3860927b7d2a7b68a6730ae (patch) | |
tree | 31e10f86e78c9146ca92644cb4a69144491c4332 | |
parent | 8d49463db893bdfcd457163865cd801b47fab178 (diff) |
Rebase image to alpine
Change-Id: I349e54dbfdb25e543312554c82c9339a39cd8817
Issue-ID: MULTICLOUD-508
Signed-off-by: Xiaohua Zhang <xiaohua.zhang@windriver.com>
-rw-r--r-- | windriver/docker/Dockerfile | 11 | ||||
-rw-r--r-- | windriver/run.sh | 4 | ||||
-rw-r--r-- | windriver/stop.sh | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/windriver/docker/Dockerfile b/windriver/docker/Dockerfile index f4e151fc..cd58bd76 100644 --- a/windriver/docker/Dockerfile +++ b/windriver/docker/Dockerfile @@ -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 diff --git a/windriver/run.sh b/windriver/run.sh index 650c2c1b..c65ecdf8 100644 --- a/windriver/run.sh +++ b/windriver/run.sh @@ -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 diff --git a/windriver/stop.sh b/windriver/stop.sh index 5e7a6ac3..882fb74d 100644 --- a/windriver/stop.sh +++ b/windriver/stop.sh @@ -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"); |