X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=org.simantics.fmil.core%2FDockerfile;h=d65bd0cdb749d19e1e44b99486815a8857ee4ba9;hb=f6f05cb36bc0b849af8090efac1d549779e2076f;hp=6e917ec8779ef7b403514fcce4d98b4faf6eadb0;hpb=a19f5279b32973dfc28ae084a8b7d20ae6aaac97;p=simantics%2Ffmil.git diff --git a/org.simantics.fmil.core/Dockerfile b/org.simantics.fmil.core/Dockerfile index 6e917ec..d65bd0c 100644 --- a/org.simantics.fmil.core/Dockerfile +++ b/org.simantics.fmil.core/Dockerfile @@ -7,46 +7,35 @@ FROM ubuntu:16.04 MAINTAINER miro.eklund@semantum.fi -ARG fmi='http://www.jmodelica.org/downloads/FMIL/FMILibrary-2.0.3-src.zip' +# Allow failures to propagate in a pipeline command +SHELL ["/bin/bash", "-o", "pipefail", "-e", "-c"] RUN apt-get update && \ apt-get -y upgrade -RUN apt-get install -y wget cmake unzip build-essential patchelf +RUN apt-get install -y cmake build-essential patchelf RUN mkdir /builds && \ - mkdir /builds/fmilsrc && \ mkdir /builds/fmil && \ mkdir /builds/fmildebug -RUN wget -O /builds/fmilsrc/fmil.zip $fmi - -WORKDIR /builds/fmilsrc - -RUN unzip /builds/fmilsrc/fmil.zip && \ - rm /builds/fmilsrc/fmil.zip +COPY ./native /sources WORKDIR /builds/fmil -RUN rm /builds/fmilsrc/FMILibrary-2.0.3/src/Util/src/FMI/fmi_util.c -COPY /native/FMUSimulator/fmi_util.c.txt /builds/fmilsrc/FMILibrary-2.0.3/src/Util/src/FMI/fmi_util.c - -RUN cat /builds/fmilsrc/FMILibrary-2.0.3/src/Util/src/FMI/fmi_util.c - -RUN cmake /builds/fmilsrc/FMILibrary-2.0.3 >> /fmil.log 2>&1 +RUN cmake /sources/FMILibrary 2>&1 | tee -a /fmil.log -RUN make >> /fmil.log 2>&1 -RUN make install test >> /fmil.log 2>&1 +RUN make 2>&1 | tee -a /fmil.log +RUN make install test 2>&1 | tee -a /fmil.log WORKDIR /builds/fmildebug -RUN cmake -DFMILIB_ENABLE_LOG_LEVEL_DEBUG=ON /builds/fmilsrc/FMILibrary-2.0.3 >> /fmildebug.log 2>&1 +RUN cmake -DFMILIB_ENABLE_LOG_LEVEL_DEBUG=ON /sources/FMILibrary 2>&1 | tee -a /fmildebug.log -RUN make >> /fmildebug.log 2>&1 -RUN make install test >> /fmildebug.log 2>&1 +RUN make 2>&1 | tee -a /fmildebug.log +RUN make install test 2>&1 | tee -a /fmildebug.log -COPY native /builds/native -WORKDIR /builds/native/FMUSimulator +WORKDIR /sources/FMUSimulator COPY ./linuxbuild/copytovolume.sh /copytovolume.sh COPY ./linuxbuild/linuxbuild.sh /linuxbuild.sh @@ -55,8 +44,8 @@ COPY ./linuxbuild/linuxdebugbuild.sh /linuxdebugbuild.sh RUN chmod 755 /linuxbuild.sh && \ chmod 755 /linuxdebugbuild.sh -RUN /linuxbuild.sh >> /builds/native/fmusimulator.log 2>&1 -RUN /linuxdebugbuild.sh >> /builds/native/fmusimulatordebug.log 2>&1 +RUN /linuxbuild.sh 2>&1 | tee -a /fmusimulator.log +RUN /linuxdebugbuild.sh 2>&1 | tee -a /fmusimulatordebug.log RUN chmod 755 /copytovolume.sh ENTRYPOINT /copytovolume.sh