2 # -------------------------------------------------------------------------
3 # Copyright (c) 2018 AT&T Intellectual Property
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # -------------------------------------------------------------------------
22 ARG MVN_ARTIFACT_VERSION
24 ARG HTTP_PROXY=${HTTP_PROXY}
25 ARG HTTPS_PROXY=${HTTPS_PROXY}
27 ENV http_proxy $HTTP_PROXY
28 ENV https_proxy $HTTPS_PROXY
34 ENV MZN_BASENAME MiniZincIDE-${MZN}-bundle-linux-x86_64
35 ENV MZN_GH_BASE https://github.com/MiniZinc/MiniZincIDE
36 ENV MZN_DL_URL ${MZN_GH_BASE}/releases/download/${MZN}/${MZN_BASENAME}.tgz
38 RUN apt-get update -y \
39 && apt-get install -y vim unzip wget libmpfr-dev \
40 && apt-get install -y git libqt5printsupport5 build-essential \
41 && apt-get install -y python3 python3-setuptools python3-dev \
42 && easy_install3 pip \
43 && pip install --upgrade virtualenv pip wheel
45 RUN ln -s /usr/bin/python3.5 /usr/bin/python
48 RUN wget -q $MZN_DL_URL -O mz.tgz \
50 && mv $MZN_BASENAME /mz-dist \
52 && echo PATH=/mz-dist:$PATH >> ~/.bashrc
55 ENV PATH /mz-dist:$PATH
59 RUN wget -O /opt/osdf.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.optf.osdf&a=optf-osdf&e=zip&v=${MVN_ARTIFACT_VERSION}" && \
60 unzip -q -o -B /opt/osdf.zip -d /opt/ && \
62 RUN mkdir -p /var/log/onap/optf/osdf/
63 RUN pip install --no-cache-dir -r requirements.txt
65 CMD [ "/opt/osdf/osdfapp.sh" ]