I am trying to run a few different processes in a bash script. I am using a Mac. Basically, I am running a CFD software called OpenFOAM that runs in a docker container, which needs to be launched before I can start running the simulation. I am following their instructions at https://openfoam.org/download/7-macos/. I have X11 installed.
So far, my script works up to the part where the container is launched, but it does not execute the command 'simpleFoam' inside the container, which runs the simulation. Basically, it launches the container and stops.
How can run a command inside of the OpenFoam container after it is launched? This is my code so far:
#!/bin/bash
cd ~/openfoam/run/airFoil2D
openfoam7-macos
simpleFoam
It basically works up to openfoam7-macos
(which launches the container) but nothing is executed after that.
The openfoam7-macos
script appears to be running docker
under the hood. How can I pass a command to execute into that?