1 # -------------------------------------------------------------------------
2 # Copyright (c) 2015-2017 AT&T Intellectual Property
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # -------------------------------------------------------------------------
18 FROM python:3.8.0-alpine
21 ARG MVN_ARTIFACT_VERSION
23 ARG HTTP_PROXY=${HTTP_PROXY}
24 ARG HTTPS_PROXY=${HTTPS_PROXY}
26 ENV http_proxy $HTTP_PROXY
27 ENV https_proxy $HTTPS_PROXY
28 ENV CON_ADDR "127.0.0.1"
32 RUN mkdir -p /etc/nginx/ssl && \
33 mkdir -p /var/log/conductor && \
34 mkdir -p /run/conductor && \
37 RUN apk --update add py-setuptools && \
45 RUN apk add py2-pip libpq python-dev
46 RUN pip install --upgrade pip
47 RUN apk add --virtual build-dependencies build-base linux-headers pcre-dev libffi-dev libxslt-dev libressl-dev
50 #RUN wget -O /opt/has.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.optf.has&a=optf-has-conductor&e=zip&v=${MVN_ARTIFACT_VERSION}" && \
51 # unzip -q -o -B /opt/has.zip -d /opt/has && \
54 COPY onap-has-tm/optf-has-conductor-${MVN_ARTIFACT_VERSION}.zip /tmp/optf-has.zip
55 RUN unzip -q -o -B /tmp/optf-has.zip -d /opt/has && rm -f /tmp/optf-has.zip
57 #PKG-INFO file must also exists in the conductor folder (i.e. besides and inside the of_has.egg-info folder). The zip file for distro above is missing it
58 RUN cp /opt/has/conductor/of_has.egg-info/PKG-INFO /opt/has/conductor
59 RUN pip install -e /opt/has/conductor
61 COPY app.wsgi /etc/nginx/conductor.wsgi
62 COPY api_paste.ini /usr/local/etc/conductor/api_paste.ini