Bin Yang | 1450ce8 | 2019-10-24 14:51:54 +0000 | [diff] [blame] | 1 | FROM python:3.7-alpine |
Ethan Lynn | c763387 | 2017-08-28 16:45:26 +0800 | [diff] [blame] | 2 | |
Bin Yang | 0a54204 | 2020-02-01 11:20:43 +0800 | [diff] [blame] | 3 | ENV MSB_PROTO "http" |
Ethan Lynn | c763387 | 2017-08-28 16:45:26 +0800 | [diff] [blame] | 4 | ENV MSB_ADDR "127.0.0.1" |
| 5 | ENV MSB_PORT "80" |
| 6 | ENV AAI_ADDR "aai.api.simpledemo.openecomp.org" |
| 7 | ENV AAI_PORT "8443" |
| 8 | ENV AAI_SCHEMA_VERSION "v11" |
| 9 | ENV AAI_USERNAME "AAI" |
| 10 | ENV AAI_PASSWORD "AAI" |
| 11 | |
| 12 | EXPOSE 9001 |
| 13 | |
Xiaohua Zhang | 2faa774 | 2019-04-12 08:47:03 +0000 | [diff] [blame] | 14 | RUN addgroup -S onap && adduser -S -G onap onap |
Bin Yang | 673917e | 2019-02-21 03:59:31 +0000 | [diff] [blame] | 15 | |
Bin Yang | d0eb179 | 2019-08-16 09:48:35 +0000 | [diff] [blame] | 16 | COPY ./multicloud-framework-broker-*.zip /opt/multicloud-framework.zip |
Xiaohua Zhang | 2faa774 | 2019-04-12 08:47:03 +0000 | [diff] [blame] | 17 | RUN apk update && \ |
| 18 | apk add uwsgi wget unzip gcc make libc-dev libffi-dev openssl-dev && \ |
Ethan Lynn | c763387 | 2017-08-28 16:45:26 +0800 | [diff] [blame] | 19 | cd /opt/ && \ |
Ethan Lynn | c763387 | 2017-08-28 16:45:26 +0800 | [diff] [blame] | 20 | unzip -q -o -B multicloud-framework.zip && \ |
| 21 | rm -f multicloud-framework.zip && \ |
Bin Yang | f4801b2 | 2019-08-16 08:08:35 +0000 | [diff] [blame] | 22 | pip3 install -r /opt/multivimbroker/requirements.txt && \ |
| 23 | pip3 install -r /opt/multivimbroker/uwsgi-requirements.txt && \ |
Xiaohua Zhang | 2faa774 | 2019-04-12 08:47:03 +0000 | [diff] [blame] | 24 | apk del wget unzip gcc make libc-dev libffi-dev openssl-dev && \ |
Xiaohua Zhang | 9d53698 | 2019-03-08 06:08:47 +0000 | [diff] [blame] | 25 | mkdir -p /var/log/onap/multicloud/multivimbroker && \ |
| 26 | chown onap:onap /var/log/onap -R && \ |
Bin Yang | 673917e | 2019-02-21 03:59:31 +0000 | [diff] [blame] | 27 | chown onap:onap /opt/multivimbroker -R |
| 28 | |
| 29 | USER onap |
Ethan Lynn | c763387 | 2017-08-28 16:45:26 +0800 | [diff] [blame] | 30 | |
| 31 | WORKDIR /opt/multivimbroker |
Bin Yang | 673917e | 2019-02-21 03:59:31 +0000 | [diff] [blame] | 32 | CMD /bin/sh -c /opt/multivimbroker/run.sh |