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}
26 ARG DEBIAN_FRONTEND=noninteractive
28 ENV http_proxy $HTTP_PROXY
29 ENV https_proxy $HTTPS_PROXY
34 RUN apt-get update -y \
35 && apt-get install -y --no-install-recommends software-properties-common wget \
36 curl ca-certificates vim unzip zip git binutils binfmt-support build-essential \
37 python3 python3-setuptools python3-dev \
38 && ln -s /usr/bin/python3.8 /usr/bin/python \
39 && curl -s https://bootstrap.pypa.io/get-pip.py | python \
40 && python -m pip --no-cache-dir install --upgrade pip wheel setuptools && rm -rf /var/lib/apt/lists/*
42 ARG MZN_DL_URL=https://github.com/MiniZinc/MiniZincIDE/releases/download/2.4.3/MiniZincIDE-2.4.3-bundle-linux-x86_64.tgz
45 RUN wget -q $MZN_DL_URL -O /tmp/mz.tgz \
46 && mkdir -p /mz-dist && tar xzf /tmp/mz.tgz -C /mz-dist --strip-components 1\
50 ENV PATH /mz-dist/bin:$PATH
54 #RUN wget -O /opt/osdf.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=releases&g=org.onap.optf.osdf&a=optf-osdf&e=zip&v=1.3.4" && \
55 # unzip -q -o -B /opt/osdf.zip -d /opt/ && \
58 && useradd -m -g onap onap
60 COPY onap-osdf-tm/optf-osdf-${MVN_ARTIFACT_VERSION}.zip /tmp/optf-osdf.zip
61 COPY onap-osdf-tm/apps /opt/osdf/apps
62 RUN unzip -q -o -B /tmp/optf-osdf.zip -d /opt/ && rm -f /tmp/optf-osdf.zip
64 RUN mkdir -p /var/log/onap/optf/osdf/ \
65 && chown -R onap:onap /var/log/onap \
66 && chown -R onap:onap /opt/osdf
68 RUN python -m pip install --no-cache-dir -r requirements.txt -r requirements-osdf.txt
72 CMD [ "/opt/osdf/osdfapp.sh", "-x", "osdfapp.py" ]