none
Confused about docker swarm mode networking. RRS feed

  • Question

  • Hi, I am a little confused about docker swarm mode networking and how to actually bring up the website/service I have created.

    first I have a 2 machine swarm setup with a manager and a worker. I have created a service using

    docker service create --replicas=2 -p 80:80 --name NameofService imagename

    This creates a service on both manager and worker. So far so good.

    If I go to the http://manager_IPaddr the site does not render

    if I do a docker inspect NameofService I see a virtual IP set

    10.255.0.30/16

    If I go to http://10.255.0.30 my site renders… http://10.255.0.31 it does not.

    If I want to be able to access this site from external to this box http://10.255.0.30 is not going to work. Also each time I create a new service its going to generate a new virtual IP.

    is there any documentation that would help show us what to do here and how to access the site from external to this 2 machine docker env?

    thanks

    Wednesday, October 2, 2019 5:57 PM