Chapter 5. Container Linking and Docker DNS

In this chapter, we will cover the following recipes:

  • Verifying a host-based DNS configuration inside a container
  • Overriding the default name resolution settings
  • Configuring links for name and service resolution
  • Leveraging Docker DNS
  • Creating Docker DNS aliases

Introduction

I’ve made a point in earlier chapters to point out that Docker does a lot of things for you in the network space. As we’ve already seen, having Docker manage IP allocations through IPAM is a huge benefit that’s not inherently obvious when you start using Docker. Another thing that Docker provides for you is DNS resolution. As we’ll see in this chapter, there are multiple levels of name and service resolution that Docker can provide. As Docker ...

Get Docker Networking Cookbook 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.