I have two virtualbox ubuntu16 guests which can communicate over a host-only network: 172.28.128.0/16 I created a docker swarm using the steps from. Following is the state of my swarm: vagrant@master:$ docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 127fuzxjq2j3ashcteu8fo248 worker1 Ready Active 43l953k75lv14uw7ni2hbib5j. master Ready Active Leader I can use this swarm to successfully run services.
![Docker Docker](http://networkstatic.net/wp-content/uploads/2015/05/docker-turtles-banner-network-copy.jpg)
But is it possible to obtain 172.28.128.0/16 based IP address of the nodes via docker? I tried looking at as well as. My objective is to contact any swarm node via remote api but for that I would require its underlying api on which remote docker daemon is enable for listening.
10 Examples of how to get Docker Container IP Address. Along that thread, here are 10 different ways to get a container or docker-machine address using the Docker/Docker-Machine CLI. This doesn’t even go into the remote http API which is slick because the client commands below are actually making calls to the verioned API described here. IP address and hostname. The IP address is assigned from the pool assigned to the network, so the Docker daemon effectively acts as a DHCP server for each container. Each network also has a default subnet mask and gateway. When the container starts, it can only be connected to a single network, using --network.