Set up multi-host networking

0 votes
I have one manager and 2 worker nodes.

machine1- manager and contains consoul

machine2- worker1

machine3- worker2

and i need to run docker-compose from any other separate machine.

Is there a way to do this?
Aug 24, 2018 in Docker by lina
• 8,110 points
20 views

1 answer to this question.

0 votes

In machine1 initialize the docker swarm

docker swarm init --advertise-addr IP_address

You'll get this:

Add the docker swarm join --token command in your machine2 and machine3.

Now you have a 3-node swarm. Back on Machine 1 you can create a multi-host overlay network:

docker network create -d overlay my-app

And then you run workloads in the network by deploying services.

answered Aug 24, 2018 by Nilesh
• 6,880 points

Related Questions In Docker

0 votes
1 answer

Is it possible to spin-up a docker host on a cloud platform?

Yes, It is definitely possible to spin ...READ MORE

answered Jul 4 in Docker by Sirajul
• 25,700 points
50 views
+4 votes
4 answers

How To Access a Service on Host From a Docker Container?

Adding to kalgi's answer, You can also ...READ MORE

answered Oct 16, 2018 in Docker by lina
• 8,110 points

edited Oct 16, 2018 by lina 4,300 views
0 votes
1 answer

Different file owner inside Docker container and in host machine Ask

Filesystems, at least in Unix- and Linux-like ...READ MORE

answered Jun 25, 2018 in Docker by Damon Salvatore
• 5,510 points
72 views
0 votes
1 answer

Different file owner inside Docker container and in host machine

Here is what you can try. Since ...READ MORE

answered Jun 27, 2018 in Docker by Atul
• 10,240 points
189 views
+1 vote
5 answers

Set containers timezones by using docker compose.

version "2" services: serviceA: ...READ MORE

answered Jul 8, 2018 in Docker by Atul
• 10,240 points
2,577 views
0 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
1,003 views
0 votes
2 answers

Why is docker image eating up my disk space that is not used by docker

Move the /var/llib/docker directory. Assuming the /root directory has enough ...READ MORE

answered Aug 6, 2018 in Docker by Nilesh
• 6,880 points
142 views