Skip to content

Commit

Permalink
Fixed new Docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximeBaudette committed Nov 1, 2017
2 parents 57a310b + 6ba53d4 commit 9d35994
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -8,4 +8,4 @@ install:
- docker pull smartslab/openipsl

script:
- docker run -i -t -v $(pwd):/OpenIPSL smartslab/openipsl sudo -u smartslab -H sh -c "python /OpenIPSL/CI/syntaxCheck.py"
- docker run -i -t -v $(pwd):/OpenIPSL smartslab/openipsl sh -c "python /OpenIPSL/CI/syntaxCheck.py"
41 changes: 25 additions & 16 deletions Dockerfile
@@ -1,27 +1,36 @@
FROM ubuntu:14.04
FROM phusion/baseimage:0.9.22
MAINTAINER Maxime Baudette "baudette@kth.se"
# Based on Dockerfile from OM Webbook by Arunkumar Palanisamy "arunkumar.palanisamy@liu.se"

RUN apt-get update
# Install wget
RUN apt-get install -y wget
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]

# Add OpenModelica stable build
RUN for deb in deb deb-src; do echo "$deb http://build.openmodelica.org/apt `lsb_release -cs` stable"; done | sudo tee /etc/apt/sources.list.d/openmodelica.list
RUN wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | sudo apt-key add -
ARG DEBIAN_FRONTEND=noninteractive
USER root

# Update index (again)
RUN apt-get update
# Make sure apt is up to date
RUN add-apt-repository 'deb http://build.openmodelica.org/apt xenial stable'
RUN curl -s http://build.openmodelica.org/apt/openmodelica.asc | apt-key add -

# Install OpenModelica
RUN apt-get install -y openmodelica

RUN apt-get install -y python-pip python-dev build-essential
RUN apt-get install -y git \
python-numpy
# Install python, omc
RUN apt-get update --fix-missing && apt-get upgrade -y -o Dpkg::Options::="--force-confold" && apt-get install -y \
python-pip \
python-dev \
build-essential \
python-numpy \
omc \
omlib-modelica-3.2.2

# Install OMPython
RUN python -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip

# Clean up APT when done.
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Add User
RUN useradd smartslab
RUN useradd -m -s /bin/bash smartslab
RUN chown -R smartslab:smartslab /home/smartslab

USER smartslab
ENV USER smartslab
WORKDIR /home/smartslab

0 comments on commit 9d35994

Please sign in to comment.