Changes related to running oof on TLS/HTTPS
[optf/has.git] / conductor / docker / Dockerfile
1 # -------------------------------------------------------------------------
2 #   Copyright (c) 2015-2017 AT&T Intellectual Property
3 #
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
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 #
16 # -------------------------------------------------------------------------
17
18 FROM python:2.7.15-alpine
19 ENV CON_PORT "8091"
20
21 EXPOSE 8091
22
23 RUN mkdir -p /etc/nginx/ssl && \
24 mkdir -p /var/log/conductor && \
25 mkdir -p /run/conductor && \
26 mkdir -p /run/nginx
27
28 RUN apk --update add py-setuptools && \
29 apk add unzip && \
30 apk add curl && \
31 apk add wget && \
32 apk add fcgiwrap && \
33 apk add bash vim && \
34 apk add nginx
35
36 RUN apk add py2-pip libpq python-dev
37 RUN pip install --upgrade pip
38 RUN apk add --virtual build-dependencies build-base linux-headers pcre-dev libffi-dev libxslt-dev libressl-dev
39 RUN pip install uwsgi
40
41 #Please leave teh following commmented out line in for test on local clusters
42 #RUN wget -O /tmp/has.zip "https://nexus.onap.org/service/local/repositories/autorelease-121393/content/org/onap/optf/has/optf-has-conductor/1.2.5/optf-has-conductor-1.2.5.zip" && \
43 RUN wget -O /tmp/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}" && \
44     unzip -q -o -B /tmp/has.zip -d /tmp/has && \
45     rm -f /tmp/has.zip
46
47 #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
48 RUN cp /tmp/has/conductor/of_has.egg-info/PKG-INFO /tmp/has/conductor
49 RUN pip install -e /tmp/has/conductor
50
51 COPY app.wsgi /etc/nginx/conductor.wsgi
52 COPY api_paste.ini /usr/local/etc/conductor/api_paste.ini