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.com] Docker vs Not Docker v2 AND installing editors into Docker (https://www.cfd-online.com/Forums/openfoam-installation/203404-docker-vs-not-docker-v2-installing-editors-into-docker.html)

u2berggeist June 26, 2018 12:38

Docker vs Not Docker v2 AND installing editors into Docker
 
Hello Everyone,

Docker vs Not Docker:

Trying to install OpenFOAM on my Ubuntu machine. This is my first time using OpenFOAM. I'm trying to figure out whether I should stick with the Docker. Personally, I find the Docker annoying (though probably helpful) as I can't access my normal tools through it (neovim, vscode, etc.) nor can I seem to install them in there either (apt, apt-get, adk all don't work on a "Command not found" error).

I saw this post from two years ago and didn't know if the result had changed or not.

I've installed the Docker right now, but am installing from source per the recommendation of that post. Just wanted to double check to make sure I haven't missed anything.


Installing Editors:
If I were to stay with Docker (which is recommended by OpenFOAM, so I'd prefer it if at all possible), is there a way to install other editors into the Docker?

I know there is vi installed right now, but vi only takes up less half the terminal window and doesn't show the normal lower bar or upper bar. It's weird. Any ideas on how to fix this? I'm using Terminator btw.




Other Docker questions:
Is there any introduction to the Docker format that's applicable for this type of use case that I can read/watch? Most "Docker Tutorials" go over how to make a Docker, not how to interact/use one.

My understanding is a Docker is very similar to a virtual environment in Python, where it's a standalone unit that has all the dependencies together in one place. The only thing I don't understand is why when I run the "startOpenFOAM" for the Docker, it takes me to another terminal (ie. all the stuff to the left of the "$" is replaced by "bash 4.2").


Anyways, lots of rambling and question. I've tried to bold all the actual questions. Let me know if I need to clarify anything.

Thanks

matejfor July 10, 2018 02:58

Hi,

OpenCFD recommends docker to use as it is simple. Simple to install and easy to use - no setup. You are free to compile from the sources.

As you correctly write, docker is a closed virtual env. And the terminal window is an interface to it. The docker container contains centOS Linux with OpenFOAM installed, so any apt will not work you have to stick to good old yum package manager. You should be able to install more or less any editor you like. On the other hand, this is not the way how I work with docker.

All the production files (my simulations, solvers ...) are not stored on the docker image, but in my host system home directory. This way I can access them easily from both sides - with vim from docker, with Atom (my favorite editor) from my Mac (my favorite OS).

The problem of a single terminal window opened to docker I solve with tmux. Server client app taking care of the terminal. You can open many different virtual terminals there, divide the terminal screen to several windows .... it’s useful and it’s fun.

Hope this helps,
Happy Foaming


All times are GMT -4. The time now is 23:58.