How can two containers on the default bridge talk via legacy `--link`?

IntermediateConceptNetworking
Answer

--link db:database adds a hosts entry and environment variables to the source container on the default bridge. It is deprecated; user-defined networks provide DNS-based discovery without links. Compose handles service discovery by service name automatically.

All Docker questions Roadmap: Docker & containers

More on Networking