This is the same problem discussed in Cannot connect to X server using docker on OS X - Part II but never resolved. In MacOS El Capitan, I'm running the OpenFOAM binary under Docker as there is no native version. I want to use paraView to view results. Cannot run the paraView supplied inside OpenFOAM since I get paraview: cannot connect to X server The advice here Cannot connect to X server using docker on OSX is to install paraView separately and run it from a normal terminal. This did not work as a normal terminal cannot "see" Docker files. And I cannot run the suggested open -a paraview foam.foam inside the docker terminal, as for some reason it does not recognize the "open" command.
Perhaps some Docker expert can help?