Skip to content

Commit

Permalink
reorder dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Seitz committed Aug 14, 2023
1 parent 48e61ed commit 2d61f8f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tools/tests/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,21 @@ RUN git clone https://github.com/precice/precice.git -b ${PRECICE_REF} precice &
make all install -j $(nproc)

FROM precice_dependecies as openfoam_adapter
ARG OPENFOAM_EXECUTABLE=openfoam2112
USER root
RUN apt-get update &&\
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | bash &&\
apt-get -qq install ${OPENFOAM_EXECUTABLE}-dev &&\
ln -s $(which ${OPENFOAM_EXECUTABLE} ) /usr/bin/openfoam

COPY --from=precice /opt/precice/installation /opt/precice/installation
ENV PATH="${PATH}:/home/precice/.local/bin:/opt/precice/installation/bin"
ENV LD_LIBRARY_PATH="/opt/precice/installation/lib:${LD_LIBRARY_PATH}"
ENV CPATH="/opt/precice/installation/include:$CPATH"
# Enable detection with pkg-config and CMake
ENV PKG_CONFIG_PATH="/opt/precice/installation/lib/pkgconfig:$PKG_CONFIG_PATH"
ENV CMAKE_PREFIX_PATH="/opt/precice/installation:$CMAKE_PREFIX_PATH"
ARG OPENFOAM_EXECUTABLE=openfoam2112
USER root
RUN apt-get update &&\
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | bash &&\
apt-get -qq install ${OPENFOAM_EXECUTABLE}-dev &&\
ln -s $(which ${OPENFOAM_EXECUTABLE} ) /usr/bin/openfoam

ARG OPENFOAM_ADAPTER_REF=master
# Build the OpenFOAM adapter
USER precice
Expand Down

0 comments on commit 2d61f8f

Please sign in to comment.