Can I bypass the routing mesh?

0 votes
Is it possible to bypass the routing mesh? If yes, what's the command to do so?
Jul 8, 2019 in Docker by Sam
• 5,330 points
94 views

1 answer to this question.

0 votes

Yes. You can bypass the routing mesh, so that when you access the bound port on a given node, you are always accessing the instance of the service running on that node. This is referred to as host mode.

To bypass the routing mesh, you must use the long --publish service and set mode to host. If you omit the mode key or set it to ingress, the routing mesh is used. 

The following command creates a global service using host mode and bypassing the routing mesh.

$ docker service create --name dns-cache \
  --publish published=53,target=53,protocol=udp,mode=host \
  --mode global \
  dns-cache
answered Jul 8, 2019 by Sirajul
• 50,320 points

Related Questions In Docker

0 votes
2 answers

How can I inspect the file system of a failed `docker build

Failed command is a build that has ...READ MORE

answered Aug 6, 2018 in Docker by Nilesh
• 6,960 points
229 views
+1 vote
0 answers
+1 vote
0 answers

How can I map a docker location to my Jenkins workspace so that I can use the files in my Jenkins

Hey guys, I was trying to execute few ...READ MORE

Feb 25 in Docker by dineshkumar
• 130 points
204 views
+1 vote
12 answers
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,172 views
0 votes
1 answer

Can I give an advance instructions to run later, during the next build stage in docker?

You can definitely give a trigger instruction ...READ MORE

answered Jul 2, 2019 in Docker by Sirajul
• 50,320 points
80 views
0 votes
2 answers

How do I fix the “no space left on device” error in docker?

Try cleaning up: $ docker volume rm $(docker ...READ MORE

answered Aug 14, 2019 in Docker by Sirajul
• 50,320 points
3,452 views