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,100 points
15 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,900 points

Related Questions In Docker

+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,100 points

edited Oct 16, 2018 by lina 2,643 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,470 points
46 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,220 points
104 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,220 points
1,550 views
0 votes
1 answer

Error “unable to resolve host docker”

This error occurs because its not a ...READ MORE

answered Jul 10, 2018 in Docker by Kalgi
• 2,620 points
182 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
850 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,900 points
90 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.