Docker: Reciprocating volumes
I am creating two containers running 2 different applications. Container A, exposes 2 directories say /opt/appA and /home/userA/runtime. Both are needed to be referred to by container B (--volumes-from A). B in turn should expose a volume /home/userB/runtime, which container A needs (--volumes-from B) when it starts.
Q. is how to achieve this? Because when I start/run container 'A', container 'B' does not yet exist (--volumes-from B does not work) and vice versa for B.
Is there a way out of this?