CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Dockerfile for OpenFOAM (https://www.cfd-online.com/Forums/openfoam-installation/245795-dockerfile-openfoam.html)

Muerio October 26, 2022 05:51

Dockerfile for OpenFOAM
 
Hello,

does anyone know, whether the Dockerfiles used for building the images offered on the openfoam.org download page are publicly available?

Where would I find these?

Thanks in advance

ukaya November 8, 2022 09:03

Hi Muerio,

In the installation instructions in step 4, it asks you to download and run this script:
Code:

http://dl.openfoam.org/docker/openfoam10-linux
There you can see that the image is: openfoam/openfoam10-paraview56 for the current version. On docker hub (https://hub.docker.com/r/openfoam/op...araview56/tags), by clicking on the tag you can view the steps that constitues the docker image.

I am not sure if the text versions of the openfoam releases are stored elsewhere.

Muerio November 9, 2022 02:01

Hi ukaya,

thank you for your reply.

I already looked at the details for the individual tags.
Unfortunately you can't get all the information you need from it.
Especially the files copied into the images.

I really hoped to find a repository of the Dockerfile somewhere so I could fork the entire setup and use it to build the image on a more frequent basis.

ukaya November 15, 2022 10:08

Hi Muerio,

You are right. Nevertheless, more or less the only critical step is "apt-get install ..."

I have come across these dockerfiles: https://github.com/PawseySC/pawsey-containers, which I use for building docker images for debugging openfoam. You might find them useful.

Cheers

olesen December 8, 2022 10:15

Quote:

Originally Posted by Muerio (Post 839025)
Hi ukaya,

thank you for your reply.

I already looked at the details for the individual tags.
Unfortunately you can't get all the information you need from it.
Especially the files copied into the images.

I really hoped to find a repository of the Dockerfile somewhere so I could fork the entire setup and use it to build the image on a more frequent basis.



The www.openfoam.com docker files are publicly available, and their use for making your own images is actively encouraged.
https://develop.openfoam.com/packaging/containers


contains templates for a variety of distributions and different compositions of openfoam. The nss-wrapper solution corresponds to the openfoam-docker start script, but there are also some chroot versions that can be useful while building content.


EDIT: just added some preliminary definition files for apptainer/singularity (doesn't need nss-wrapper at all).

alexisespinosa March 13, 2023 23:46

Thanks a lot for that.
Anyone knows about a repository with the Dockerfiles for the OpenFOAM.org flavour?
(Although after having a look to those for ESI flavour, the recipes are indeed not particularly useful for my purposes, as they are simple installations using apt-get install rather than an installation from source. I guess Dockerfiles from the "Foundation" flavour are going to be the same, simple use of apt-get install within an Ubuntu container.)

olesen March 15, 2023 09:43

Quote:

Originally Posted by alexisespinosa (Post 846137)
Thanks a lot for that.
Anyone knows about a repository with the Dockerfiles for the OpenFOAM.org flavour?
(Although after having a look to those for ESI flavour, the recipes are indeed not particularly useful for my purposes, as they are simple installations using apt-get install rather than an installation from source. I guess Dockerfiles from the "Foundation" flavour are going to be the same, simple use of apt-get install within an Ubuntu container.)


If you dig deeper on https://develop.openfoam.com/packaging/containers you will notice there are actually some additional files there too.
The https://develop.openfoam.com/packagi...ntu.Dockerfile (for example) sets up a container for building OpenFOAM. You can then either use/reuse a deb file for building, following the packages debian rules, or else simply do a regular OpenFOAM build (ie, with wmake) after using foamConfigurePaths to select system components for scotch, mpi, etc.


An alternative approach is noted in the wiki information: https://develop.openfoam.com/packagi...s/-/wikis/home


This describes using a rocky image for building the binary content and then re-deploying that content for a UBI (RedHat binary image). Not sure what other combinations you'd want.


/mark


All times are GMT -4. The time now is 02:44.