2 #docker build -f Dockerfile -t fmilibrary:build .
3 #Then COPY the .so files (and logs) to your org.simantics.fmil.linux64:
4 #docker run -v /path/to/org.simantics.fmil.linux64/libraries:/output fmilibrary:build
8 MAINTAINER miro.eklund@semantum.fi
10 # Allow failures to propagate in a pipeline command
11 SHELL ["/bin/bash", "-o", "pipefail", "-e", "-c"]
13 RUN apt-get update && \
16 RUN apt-get install -y cmake build-essential patchelf
18 RUN mkdir /builds && \
19 mkdir /builds/fmil && \
20 mkdir /builds/fmildebug
22 COPY ./native /sources
26 RUN cmake /sources/FMILibrary 2>&1 | tee -a /fmil.log
28 RUN make 2>&1 | tee -a /fmil.log
29 RUN make install test 2>&1 | tee -a /fmil.log
31 WORKDIR /builds/fmildebug
33 RUN cmake -DFMILIB_ENABLE_LOG_LEVEL_DEBUG=ON /sources/FMILibrary 2>&1 | tee -a /fmildebug.log
35 RUN make 2>&1 | tee -a /fmildebug.log
36 RUN make install test 2>&1 | tee -a /fmildebug.log
38 WORKDIR /sources/FMUSimulator
40 COPY ./linuxbuild/copytovolume.sh /copytovolume.sh
41 COPY ./linuxbuild/linuxbuild.sh /linuxbuild.sh
42 COPY ./linuxbuild/linuxdebugbuild.sh /linuxdebugbuild.sh
44 RUN chmod 755 /linuxbuild.sh && \
45 chmod 755 /linuxdebugbuild.sh
47 RUN /linuxbuild.sh 2>&1 | tee -a /fmusimulator.log
48 RUN /linuxdebugbuild.sh 2>&1 | tee -a /fmusimulatordebug.log
50 RUN chmod 755 /copytovolume.sh
51 ENTRYPOINT /copytovolume.sh