3 ms·
I've been running into this line of thought quite a bit as I explore containers, but nowhere is it addressed how contained applications talk to each other. An
by GrinningFool 13y ago
I've been running into this line of thought quite a bit as I explore containers, but nowhere is it addressed how contained applications talk to each other. An app seldom lives on its own - it will integrate databases, API calls into other systems, etc - how are those configured reliably and correctly when in such a transient environment? Are they also containers? If so, how are they discovered? Dynamic configuration generation or does the application have to be aware of how to discover them at runtime?
What about in a dev environment? It seems that configuration on a single local host would look vastly different, in spite of the same code running.
- simonw 13y agoIf you read through the redis service example it might answer some of your questions: http://docs.docker.io/en/latest/examples/running_redis_service/ http://docs.docker.io/en/latest/examples/running_redis_servi... It shows how a container can be "linked" to another container with an alias, and that alias then causes environment variables within the container to point to the correct IP address and port: DB_NAME=/violet_wolf/db DB_PORT_6379_TCP_PORT=6379 DB_PORT=tcp://172.17.0.33:6379 DB_PORT_6379_TCP=tcp://172.17.0.33:6379 DB_PORT_6379_TCP_ADDR=172.17.0.33 DB_PORT_6379_TCP_PROTO=tcp
- GrinningFool 13y agoCool, thanks for the link.