How to communicating between 2 machines running docker

Could you have a look at this very recent thread and see if it's exactly what you need? I think it'll come down to how you declare that service and using the "network_mode" option. Dialing from a containerised service Also mentioned in that thread is the official doc that shows an example or two Deploy the Router with Docker | NetFoundry Documentation

Looking at your example, you're not using another container with proper intercept capabilities. You'll need that.

Hope that helps?