I haven’t tried this before but there seems another way to connect containers from different host machines: overlay network and swarm.
Initializing a docker swarm needs 3 host machines (manager and workers, the manager can also be a worker) and some ports opened in each host.
I think it is just like trying to set up a VPN but in the docker’s way. This “3” is a bit annoying though.
Anyways, you may want to give it a shot now that we have more topic names available to check 