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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.