I have some nodejs code in a folder on a host machine that has an npm module that requires an environment variable to be set in order to utilize an executable called FFmpeg. I have a containerized FFmpeg along with its dependencies for development purposes and am now wondering how I am able to specify the path to the FFmpeg executable from the host machine in order for this npm module to function correctly.
I have the idea to use a docker volume that exposes the executable from the container onto the host and then to set the environment variable using that path but I'm not sure if this will work.
Some notes from the module's docs.
If the FFMPEG_PATH environment variable is set, fluent-ffmpeg will use it as the full path to the ffmpeg executable. Otherwise, it will attempt to call ffmpeg directly (so it should be in your PATH). You must also have ffprobe installed (it comes with ffmpeg in most distributions). Similarly, fluent-ffmpeg will use the FFPROBE_PATH environment variable if it is set, otherwise it will attempt to call it in the PATH.