Connecting to database containers from application containers

Docker has a DNS server built into the platform, which is used by containers for service discovery. I started the NerdDinner database container with an explicit name, and any other containers running in the same Docker network can access this container by its name, in exactly the same way as a web server would access a remote database server by its DNS hostname:

This makes application configuration much simpler than a traditional distributed solution. Every environment will look the same. In development, integration testing, QA, and production, the web container will always connect ...

Get Docker on Windows - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.