How to dockerize a private IPFS and use it inside an api

I’m trying to dockerize a MERN stack app that relies on a private IPFS .
Si i created 4 images (react,node,ipfs,mongo)
The problem that i’m facing is that i can’t get access to the ipfs image inside the node js image (i have an api that uploads files to ipfs), and if i try to install the ipfs inside the node js image , i will no longer have access to those files in the front image.
What is the best approach that i can follow ?