Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfiles with OMPython for OMSimulator CI on Jenkins #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions OMPython/docker/Dockerfile.ompython.linux64.bionic
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Build with
# $ docker build --tag docker.openmodelica.org/ompython:bionic -f Dockerfile.ompython.linux64.bionic .
FROM ubuntu:bionic

# Get rid of the warning: "debconf: unable to initialize frontend: Dialog"
# https://github.com/moby/moby/issues/27988
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
# Install git, wget, Python 3 + pandas
&& apt-get update \
&& apt-get install git python3-pip wget -qy \
&& pip3 install pandas \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
# Install OMC and OMPython
&& 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 \
&& wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | apt-key add - \
# To verify that your key is installed correctly
&& apt-key fingerprint \
# Gives output:
# pub 2048R/64970947 2010-06-22
# Key fingerprint = D229 AF1C E5AE D74E 5F59 DF30 3A59 B536 6497 0947
# uid OpenModelica Build System
&& apt-get update \
&& apt-get install omc -qy \
&& python3 -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
# Add non-root user
&& useradd -m -s /bin/bash testUser

USER testUser
ENV USER testUser
ENV HOME /home/testUser
WORKDIR $HOME
34 changes: 34 additions & 0 deletions OMPython/docker/Dockerfile.ompython.linux64.focal
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Build with
# $ docker build --tag docker.openmodelica.org/ompython:focal -f Dockerfile.ompython.linux64.focal .
FROM ubuntu:focal

# Get rid of the warning: "debconf: unable to initialize frontend: Dialog"
# https://github.com/moby/moby/issues/27988
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
# Install git, wget, Python 3 + pandas
&& apt-get update \
&& apt-get install git python3-pip wget -qy \
&& pip3 install pandas \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
# Install OMC and OMPython
&& 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 \
&& wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | apt-key add - \
# To verify that your key is installed correctly
&& apt-key fingerprint \
# Gives output:
# pub 2048R/64970947 2010-06-22
# Key fingerprint = D229 AF1C E5AE D74E 5F59 DF30 3A59 B536 6497 0947
# uid OpenModelica Build System
&& apt-get update \
&& apt-get install omc -qy \
&& python3 -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
# Add non-root user
&& useradd -m -s /bin/bash testUser

USER testUser
ENV USER testUser
ENV HOME /home/testUser
WORKDIR $HOME
43 changes: 43 additions & 0 deletions OMPython/docker/Dockerfile.ompython.wine64.bionic
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Build with
# $ docker build --tag docker.openmodelica.org/ompython:wine-bionic -f Dockerfile.ompython.wine64.bionic .
FROM ubuntu:bionic

ENV DEBIAN_FRONTEND noninteractive
ENV DISPLAY=:0.0

# Get rid of the warning: "debconf: unable to initialize frontend: Dialog"
# https://github.com/moby/moby/issues/27988
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
# Install Wine and X Virtual Frame Buffer
&& pwd && dpkg --add-architecture i386 && apt-get update && apt-get upgrade -qy && apt-get dist-upgrade -qy \
&& apt-get install -qy wine64 wine-stable xvfb \
&& rm -rf /var/lib/apt/lists/* ~/.wine* \
# Install git, wget, Python 3 + pandas
&& apt-get update \
&& apt-get install git python3-pip wget -qy \
&& pip3 install pandas \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
# Install OMC and OMPython
&& 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 \
&& wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | apt-key add - \
# To verify that your key is installed correctly
&& apt-key fingerprint \
# Gives output:
# pub 2048R/64970947 2010-06-22
# Key fingerprint = D229 AF1C E5AE D74E 5F59 DF30 3A59 B536 6497 0947
# uid OpenModelica Build System
&& apt-get update \
&& apt-get install omc -qy \
&& python3 -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
# Add non-root user
&& useradd -m -s /bin/bash testUser

USER testUser
ENV USER testUser
ENV HOME /home/testUser
WORKDIR $HOME

CMD Xvfb $DISPLAY
Loading