#syntax=docker/dockerfile:1 ### use ubuntu 20.04 FROM ubuntu:focal ARG LC_ALL=C.UTF-8 ARG DEBIAN_FRONTEND=noninteractive ### download system packages RUN apt-get update \ && apt-get install -y \ wget \ build-essential \ pkg-config \ cmake \ git \ gnuplot \ mesa-utils ### download precice core and openfoam from repos RUN wget https://github.com/precice/precice/releases/download/v2.5.0/libprecice2_2.5.0_focal.deb \ && wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | bash \ && apt install -y \ ./libprecice2_2.5.0_focal.deb \ openfoam2306-dev ### install OF adapter WORKDIR /opt RUN git clone --branch=master --depth 1 https://github.com/precice/openfoam-adapter WORKDIR /opt/openfoam-adapter RUN rm /bin/sh \ && ln -s /bin/bash /bin/sh \ && . /usr/lib/openfoam/openfoam2306/etc/bashrc \ && ./Allwmake -j 4 ### download tutorials WORKDIR /opt RUN git clone --branch=master --depth 1 https://github.com/precice/tutorials.git ### download mc RUN apt-get install -y mc ### run from tutorials WORKDIR /opt/tutorials/quickstart CMD bash