Bascially I am trying to setup a single Redis-sentinel docker instance and want to make calls from my app container. The issue I am running is this - the redis-sentinel container is linked to the app container.
So, initially the app asks the sentinel process about the redis master. The sentinel then says it is "127.0.0.1". But the app container assumes that it is local to the container. This can be overcome with announce-ip/announce-port parameters passed at the start of sentinel process. However, the issue is this -
the redis-sentinel container tries to start up before the link is being established. So even during the time of sentinel process launch the network interface hence the link IP is not available.
One solution I could think of is to busy wait till the network interface is established. So, the question then boils down to "how can source container discover its newly established network interface? Is there anything docker sets on the source container for it to discover different links?"
The linking is all managed in docker-compose file.
If there is any other simple solution, I am welcome to try that as well.