Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gerlero committed Aug 9, 2024
1 parent 51fdd2e commit f1e90a7
Showing 1 changed file with 8 additions and 27 deletions.
35 changes: 8 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
ARG FOAM_VERSION=2406
ARG OPENFOAM_VERSION=2406

FROM opencfd/openfoam-dev:${FOAM_VERSION} as dev

ARG FOAM_VERSION
FROM microfluidica/openfoam:${OPENFOAM_VERSION} as dev

Check warning on line 3 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 3 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

ARG PMT_DIR=/usr/local/porousMicroTransport

Expand All @@ -14,39 +12,22 @@ COPY libraries ${PMT_SRC}
COPY solvers ${PMT_SOLVERS}
COPY Allwmake Allwclean LICENSE ${PMT_DIR}/

RUN . /openfoam/profile.rc \
# build and install for all users
&& ${PMT_DIR}/Allwmake -j -prefix=group \
# build and install for all users
RUN ${PMT_DIR}/Allwmake -j -prefix=group \
# clean up
&& ${PMT_DIR}/Allwclean \
# smoke test
&& moistureDiffusivityTransportFoam -help

ARG PMT_URL=https://github.com/gerlero/porousMicroTransport

COPY <<EOF /openfoam/assets/welcome.sh
echo "---------------------------------------------------------------------------"
echo " porousMicroTransport"
echo "---------------------------------------------------------------------------"
echo "Homepage: ${PMT_URL}"
echo "OpenFOAM: v${FOAM_VERSION} (www.openfoam.com)"
[ ! -e "${PMT_DIR}" ] || echo "Source code: ${PMT_DIR}"
[ ! -e "\${PMT_TUTORIALS}" ] || echo "Tutorials: \${PMT_TUTORIALS}"
echo "---------------------------------------------------------------------------"
EOF


FROM opencfd/openfoam-run:${FOAM_VERSION} as run
FROM microfluidica/openfoam:${OPENFOAM_VERSION}-slim as run

Check warning on line 23 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 23 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

ARG FOAM_VERSION
ARG OPENFOAM_VERSION

COPY --from=dev /usr/lib/openfoam/openfoam${FOAM_VERSION}/site/ /usr/lib/openfoam/openfoam${FOAM_VERSION}/site/

COPY --from=dev /openfoam/assets/welcome.sh /openfoam/assets/welcome.sh
COPY --from=dev /usr/lib/openfoam/openfoam${OPENFOAM_VERSION}/site/ /usr/lib/openfoam/openfoam${OPENFOAM_VERSION}/site/

# smoke test
RUN . /openfoam/profile.rc \
&& moistureDiffusivityTransportFoam -help
RUN moistureDiffusivityTransportFoam -help


FROM dev
Expand Down

0 comments on commit f1e90a7

Please sign in to comment.