I am having 10 Dockers running in production environment all are talking to each other using a docker bridge that I defined, everything works great till you restart the production server. Post restart the bridge IP address to docker containers changes and Dockers are no longer able to communicate with each other. As the IP addresses are hard-coded in the configuration of a docker that handles communication with other Dockers. As a result I have to reconfigure this docker on every weekend.
Wanted to know if there’s any way I can eliminate this manual step and may be map the Dockers based on their name or something. Currently thinking of using docker-compose file but not sure how I can configure the IP address, as the bridge IP addresses are not known while building the file.
Any help in resolving this issue is greatly appreciated.
Thank you in Advance.
Source: Docker Questions