I'm looking for best practice guidance with the following scenario. I have an NGINX container and an FPM container. I would like to use the MediaInfo binary via a PHP wrapper. Should I:
A) Add the MediaInfo binary to the FPM container. Would this be appropriate as MediaInfo in not a long running process and PHP would effectively be using MediaInfo as a subprocess in a similar way to how PHP uses ImageMagick via a PECL extension i.e. PHP would halt and handover to MediaInfo until complete - there would not be 2 separate concurrent processes running within the same container.
B) Install MediaInfo binary on a separate container. If so, what would be the best was to integrate with MediaInfo from PHP? One solution would be to wrap MediaInfo in a RESTful interface, but this would then require a web server on the same container and in reality be no different to solution A.
C) Install MediaInfo binary on a separate container and call it directly from the FPM container (without a RESTful interface). Is there a way to do this that is secure?
D) Another solution that I've not detailed, as my Docker knowledge is limited!
Any input would be much appreciated.