Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 840
saikishor Avatar asked Oct 26 '17 10:10

saikishor


1 Answers

There are multiple options to do that:

  • You can use weave.
  • You can set up a docker overlay network
  • You can use Docker Swarm
  • You can create macvlan docker network

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

  • Assign static macvlan ip
  • Assign dynamic ip, using DHCP client
like image 119
Bogdan B. Avatar answered Nov 01 '22 07:11

Bogdan B.