Skip to content

Commit 7826f2b

Browse files
AnHeuermannAnHeuermann
AnHeuermann
authored and
AnHeuermann
committed
Jenkins and Dockerfiles with OMPython for OMSimulator CI on Jenkins
1 parent e0e09e8 commit 7826f2b

File tree

4 files changed

+492
-0
lines changed

4 files changed

+492
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Build with
2+
# $ docker build --tag docker.openmodelica.org/ompython:bionic -f Dockerfile.ompython.linux64.bionic .
3+
FROM ubuntu:bionic
4+
5+
# Get rid of the warning: "debconf: unable to initialize frontend: Dialog"
6+
# https://github.com/moby/moby/issues/27988
7+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
8+
9+
# Install git, wget, Python 3 + pandas
10+
RUN apt-get update \
11+
&& apt-get install git python3-pip wget -qy \
12+
&& pip3 install pandas \
13+
&& rm -rf /var/lib/apt/lists/* \
14+
&& apt-get clean
15+
16+
# Install OMC and OMPython
17+
RUN for deb in deb deb-src; do echo "$deb http://build.openmodelica.org/apt bionic stable"; done | tee /etc/apt/sources.list.d/openmodelica.list \
18+
&& wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | apt-key add - \
19+
# To verify that your key is installed correctly
20+
&& apt-key fingerprint \
21+
# Gives output:
22+
# pub 2048R/64970947 2010-06-22
23+
# Key fingerprint = D229 AF1C E5AE D74E 5F59 DF30 3A59 B536 6497 0947
24+
# uid OpenModelica Build System
25+
&& apt-get update \
26+
&& apt-get install omc -qy \
27+
&& python3 -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip \
28+
&& rm -rf /var/lib/apt/lists/* \
29+
&& apt-get clean
30+
31+
# Add non-root user
32+
RUN useradd -m -s /bin/bash testUser
33+
34+
USER testUser
35+
ENV USER testUser
36+
ENV HOME /home/testUser
37+
WORKDIR $HOME
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Build with
2+
# $ docker build --tag docker.openmodelica.org/ompython:focal -f Dockerfile.ompython.linux64.focal .
3+
FROM ubuntu:focal
4+
5+
# Get rid of the warning: "debconf: unable to initialize frontend: Dialog"
6+
# https://github.com/moby/moby/issues/27988
7+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
8+
9+
# Install git, wget, Python 3 + pandas
10+
RUN apt-get update \
11+
&& apt-get install git python3-pip wget -qy \
12+
&& pip3 install pandas \
13+
&& rm -rf /var/lib/apt/lists/* \
14+
&& apt-get clean
15+
16+
# Install OMC and OMPython
17+
RUN for deb in deb deb-src; do echo "$deb http://build.openmodelica.org/apt focal stable"; done | tee /etc/apt/sources.list.d/openmodelica.list \
18+
&& wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | apt-key add - \
19+
# To verify that your key is installed correctly
20+
&& apt-key fingerprint \
21+
# Gives output:
22+
# pub 2048R/64970947 2010-06-22
23+
# Key fingerprint = D229 AF1C E5AE D74E 5F59 DF30 3A59 B536 6497 0947
24+
# uid OpenModelica Build System
25+
&& apt-get update \
26+
&& apt-get install omc -qy \
27+
&& python3 -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip \
28+
&& rm -rf /var/lib/apt/lists/* \
29+
&& apt-get clean
30+
31+
# Add non-root user
32+
RUN useradd -m -s /bin/bash testUser
33+
34+
USER testUser
35+
ENV USER testUser
36+
ENV HOME /home/testUser
37+
WORKDIR $HOME
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Build with
2+
# $ docker build --tag docker.openmodelica.org/ompython:wine-bionic -f Dockerfile.ompython.wine64.bionic .
3+
FROM ubuntu:bionic
4+
5+
# Get rid of the warning: "debconf: unable to initialize frontend: Dialog"
6+
# https://github.com/moby/moby/issues/27988
7+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
8+
9+
# Install Wine and X Virtual Frame Buffer
10+
RUN pwd && dpkg --add-architecture i386 && apt-get update && apt-get upgrade -qy && apt-get dist-upgrade -qy \
11+
&& apt-get install -qy wine64 wine-stable xvfb \
12+
&& rm -rf /var/lib/apt/lists/* ~/.wine*
13+
ENV DEBIAN_FRONTEND noninteractive
14+
ENV DISPLAY=:0.0
15+
16+
# Install git, wget, Python 3 + pandas
17+
RUN apt-get update \
18+
&& apt-get install git python3-pip wget -qy \
19+
&& pip3 install pandas \
20+
&& rm -rf /var/lib/apt/lists/* \
21+
&& apt-get clean
22+
23+
# Install OMC and OMPython
24+
RUN for deb in deb deb-src; do echo "$deb http://build.openmodelica.org/apt bionic stable"; done | tee /etc/apt/sources.list.d/openmodelica.list \
25+
&& wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | apt-key add - \
26+
# To verify that your key is installed correctly
27+
&& apt-key fingerprint \
28+
# Gives output:
29+
# pub 2048R/64970947 2010-06-22
30+
# Key fingerprint = D229 AF1C E5AE D74E 5F59 DF30 3A59 B536 6497 0947
31+
# uid OpenModelica Build System
32+
&& apt-get update \
33+
&& apt-get install omc -qy \
34+
&& python3 -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip \
35+
&& rm -rf /var/lib/apt/lists/* \
36+
&& apt-get clean
37+
38+
# Add non-root user
39+
RUN useradd -m -s /bin/bash testUser
40+
41+
USER testUser
42+
ENV USER testUser
43+
ENV HOME /home/testUser
44+
WORKDIR $HOME
45+
46+
CMD Xvfb $DISPLAY

0 commit comments

Comments
 (0)