Ticket #6214: Dockerfile

File Dockerfile, 1.2 KB (added by arunkumar palanisamy, 4 years ago)
Line 
1FROM ubuntu:18.04
2MAINTAINER Arunkumar Palanisamy "arunkumar.palanisamy@liu.se"
3RUN apt-get update
4
5RUN apt-get install -y sudo gnupg lsb-release wget
6
7RUN for deb in deb deb-src; do echo "$deb http://build.openmodelica.org/apt `lsb_release -cs` nightly"; done | sudo tee /etc/apt/sources.list.d/openmodelica.list
8RUN wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | sudo apt-key add -
9
10# Update index (again)
11RUN apt-get update
12
13# Install minimal OpenModelica Components
14RUN apt-get install -y omc omlib-modelica-3.2.2
15
16RUN apt-get install -y git
17
18# instal python3-pip
19RUN apt-get install -y python3-pip
20
21RUN pip3 install --upgrade pip
22
23# Install OMPython
24RUN pip3 install -U git+https://github.com/OpenModelica/OMPython.git
25
26# ADD non-root users
27RUN useradd -m -s /bin/bash openmodelicausers
28
29# add and set up the working directory
30ADD . /compile_mod
31WORKDIR /compile_mod
32
33# set user permissions to the directory
34RUN chown -R openmodelicausers:openmodelicausers /compile_mod
35RUN chmod 755 /compile_mod
36
37RUN pip3 install -r /compile_mod/requirements.txt
38
39USER openmodelicausers
40ENV USER openmodelicausers
41
42
43#CMD /bin/bash
44#CMD python3 compile_mod.py