Search code examples
dockerdocker-machine

How to connect containers on two different hosts connected by LAN


I would like to know how to make one container discoverable to another container running on different host but connected by LAN. Basically, I want to run two containers on different hosts and I want them to communicate, in this way I suppose I can implemented distributed training on tensorflow.

Is there any possible way to accomplish this?


Solution

  • There are multiple options to do that:

    You may also use a special script called pipework, which will automatically do the job: