I have an existing application consisting of 4 docker containers running on the same host. They are linked by the link command.
However, after some docker updates, the link behavior has been deprecated and changed. We have problems when containers lose contact with each other.
So, docker says to use the new Network function on top of link ed containers. But I do not see how it works.
If 2 containers are on the same network, then the same ENV vars are automatically displayed on the containers, as if they were connected?
Or is the host file updated with the correct container name / IP addresses? Even after docker restart ?
I do not see in the documents how the container can find the location of another on its network?
In addition, compose seems to have a simple configuration for container binding and can automate some of them - would this be a way to go about defining multi-container applications? Or is it too early to put it into production?
Does compose support multiple host configurations?
at some point in the future we will probably need to transfer one of the containers to another host ....
source share