Open grayside opened 6 years ago
The functionality of links to propagate environment variables either caused trouble or misdirected troubleshooting efforts for one developer recently, pointing to the unintended side-effects of links
that we don't want.
Problem
Outrigger DNS configures requests as follows:
.vm
TLD are routed to the Docker Machine bridge IP.Because of this flow, in order to connect to the container via this DNS lookup, that container must be on the "bridge" network, hence our use of
network_mode: bridge
ubiquitously in docker-compose configuration to override the docker-compose default behavior of generating a user-defined network.Unfortunately a user defined network and the bridge network cannot coexist. While it's possible to imagine a change to enable that in Docker itself, the whole point of the user-defined networks is to create a built-in firewall mechanism, while the bridge network allows the containers to cross-talk if they know a way to find each other.
Why do we want user defined networks?
How should project networking be set up?
Take a Drupal Stack example with SSL Termination, Varnish, Solr, Redis, Apache, PHP-FPM, and MariaDB.
This Drupal stack illustrates a case of strong point-to-point networks with no cross-talk outside what's strictly necessary for ideal traffic/control flows.
Our build container would be spun up and attached to all these networks as a means of getting access to the entire set of services.
Notes