In this chapter, we will cover the following recipes:
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 has matured, so have the options to provide these types of services. In this chapter, we’ll start to review basic name resolution and how a container knows which DNS server to use. We’ll then cover container linking and see how Docker can tell containers about other containers and the services they host. Finally, we’ll walk through some of the DNS enhancements that came along with the addition of user-defined networks.