Hi,
I think the hardest part is to get the ROS_IP and ROS_MASTER_URI set correctly inside the docker images to see the ros master and communicate with it. There is an example
here launching rtabmap node in a docker and talking to a roscore started on the computer. For 2 dockers on different machines, you may have to change the default IP settings used by docker.