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,220 points
464 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
• 7,060 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, 2019 in Docker by Sirajul
• 59,230 points
743 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,220 points

edited Oct 16, 2018 by lina 33,943 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,980 points
903 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
1,901 views
+1 vote
5 answers

Set containers timezones by using docker compose.

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

answered Jul 9, 2018 in Docker by Atul
• 10,240 points
23,372 views
+2 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
3,771 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
• 7,060 points
1,692 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP