dockeropenfoam

how to Prepar/Use docker executor/pull docker image openfoamplus/of_v1612plus_centos66?


I am trying to pull and run docker image openfoamplus/of_v1612plus_centos66 as follows:

  1. I have used this main Command
docker container run -ti cfdengine/openfoam
  1. The name of openfoamplus (1612+) by using the following command to get the name
docker search openfoam
openfoamplus/of_v1612plus_centos66
  1. Then I used upper main Command with the name of openfoam plus as follows
docker container run -ti cfdengine/openfoamplus/of_v1612plus_centos66
  1. it gives me always this error (Error)
$ Unable to find image 'cfdengine/openfoamplus/of_v1612plus_centos66:latest' locally
docker: Error response from daemon: Head "https://registry-1.docker.io/v2/cfdengine/openfoamplus/of_v1612plus_centos66/manifests/latest": unknown: invalid repository name.
  1. When I am using the main Command it gives no errors and I could be in foam
docker container run -ti cfdengine/openfoam
whoami ------ > foam
openfoam6 (not openfoamplus 1612+)
  1. When I use the following command, it shows that openfoamplus 1612+ image is already existing
dockerimages

REPOSITORY                           TAG       IMAGE ID       CREATED       SIZE
cfdengine/openfoam                   latest    4b64701b18ec   4 years ago   1.33GB
openfoamplus/of_v1612plus_centos66   latest    5fce8f6a8a79   6 years ago   2.17GB

I have tried another way to pull this version of openfoam as in GitHub but did not work also. I am totally new with openfoam. I am using Linux Ubuntu 22.04.1 LTS und want to compile with openfoam plus 1612+. Any suggestion or direction would be great.

Thank you


Solution

  • You should run the container as follows:

    docker run -it openfoamplus/of_v1612plus_centos66 /bin/bash
    

    Within the container, change the directory to:

    cd /opt/OpenFOAM/
    

    source the script: setImage_v1612+ by running:

    source setImage_v1612+
    

    Now you should be able to use OpenFOAM-v1612+, in other words you can run OpenFOAM solvers/utilies, e.g:

    simpleFoam