OpenFOAM (openfoam.org) does not provide a docker image for OpenFOAM-3.
mkdir ~/OpenFOAM/$USER-3
mkdir ~/OpenFOAM/OpenFOAM-3
pushd $_
Now download The Dockerfile
above and put it in the OpenFOAM-3 directory with the name Dockerfile
.
Then build the OpenFOAM-3 image
# Build an OpenFOAM-3 docker image from this Dockerfile
docker build -t openfoam-3 .
Now run openfoam-3 containers per below
# Set alias for this long command
# For subsequent shell sessions put this into your shell config
alias of3='cd $HOME/OpenFOAM/$USER-3 && docker run -v $PWD:/home/openfoam -it --rm openfoam-3'
# Now Load OpenFOAM-3 environment with
of3