78f7910bdf4b8d43d420550a1769134d005e5fb8
[optf/osdf.git] / docker / Dockerfile
1 #
2 # -------------------------------------------------------------------------
3 #   Copyright (c) 2018 AT&T Intellectual Property
4 #
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
8 #
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
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.
16 #
17 # -------------------------------------------------------------------------
18 #
19
20 FROM ubuntu:16.04
21
22 ENV OSDF_PORT "8699"
23 EXPOSE ${OSDF_PORT}
24
25 ENV MZN 2.1.6
26 ENV MZN_BASENAME MiniZincIDE-${MZN}-bundle-linux-x86_64
27 ENV MZN_GH_BASE https://github.com/MiniZinc/MiniZincIDE
28 ENV MZN_DL_URL ${MZN_GH_BASE}/releases/download/${MZN}/${MZN_BASENAME}.tgz
29
30 RUN apt-get update -y \
31     && apt-get install -y vim wget libmpfr-dev \
32     && apt-get install -y git libqt5printsupport5 build-essential \
33     && apt-get install -y python3 python3-setuptools python3-dev \
34     && easy_install3 pip \
35     && pip install --upgrade virtualenv pip wheel 
36
37 RUN ln -s /usr/bin/python3.5 /usr/bin/python
38
39 # Minizinc
40 RUN wget -q $MZN_DL_URL -O mz.tgz \
41     && tar xzf mz.tgz \
42     && mv $MZN_BASENAME /mz-dist \
43     && rm mz.tgz \
44     && echo PATH=/mz-dist:$PATH >> ~/.bashrc
45
46 ENV SHELL /bin/bash
47 ENV PATH /mz-dist:$PATH
48
49 # OSDF
50 RUN git clone http://gerrit.onap.org/r/optf/osdf \
51     && pip install --no-cache-dir -r osdf/requirements.txt
52
53 CMD [ "source /osdf/osdfapp.sh" ]