blob: f12a87590697eaf2062106022a2bb853177338b9 [file] [log] [blame]
Bin Yang1450ce82019-10-24 14:51:54 +00001FROM python:3.7-alpine
Ethan Lynnc7633872017-08-28 16:45:26 +08002
Bin Yang0a542042020-02-01 11:20:43 +08003ENV MSB_PROTO "http"
Ethan Lynnc7633872017-08-28 16:45:26 +08004ENV MSB_ADDR "127.0.0.1"
5ENV MSB_PORT "80"
6ENV AAI_ADDR "aai.api.simpledemo.openecomp.org"
7ENV AAI_PORT "8443"
8ENV AAI_SCHEMA_VERSION "v11"
9ENV AAI_USERNAME "AAI"
10ENV AAI_PASSWORD "AAI"
11
12EXPOSE 9001
13
Xiaohua Zhang2faa7742019-04-12 08:47:03 +000014RUN addgroup -S onap && adduser -S -G onap onap
Bin Yang673917e2019-02-21 03:59:31 +000015
Bin Yangd0eb1792019-08-16 09:48:35 +000016COPY ./multicloud-framework-broker-*.zip /opt/multicloud-framework.zip
Xiaohua Zhang2faa7742019-04-12 08:47:03 +000017RUN apk update && \
18 apk add uwsgi wget unzip gcc make libc-dev libffi-dev openssl-dev && \
Ethan Lynnc7633872017-08-28 16:45:26 +080019 cd /opt/ && \
Ethan Lynnc7633872017-08-28 16:45:26 +080020 unzip -q -o -B multicloud-framework.zip && \
21 rm -f multicloud-framework.zip && \
Bin Yangf4801b22019-08-16 08:08:35 +000022 pip3 install -r /opt/multivimbroker/requirements.txt && \
23 pip3 install -r /opt/multivimbroker/uwsgi-requirements.txt && \
Xiaohua Zhang2faa7742019-04-12 08:47:03 +000024 apk del wget unzip gcc make libc-dev libffi-dev openssl-dev && \
Xiaohua Zhang9d536982019-03-08 06:08:47 +000025 mkdir -p /var/log/onap/multicloud/multivimbroker && \
26 chown onap:onap /var/log/onap -R && \
Bin Yang673917e2019-02-21 03:59:31 +000027 chown onap:onap /opt/multivimbroker -R
28
29USER onap
Ethan Lynnc7633872017-08-28 16:45:26 +080030
31WORKDIR /opt/multivimbroker
Bin Yang673917e2019-02-21 03:59:31 +000032CMD /bin/sh -c /opt/multivimbroker/run.sh