A system administrator is troubleshooting a container that cannot resolve DNS names for other containers on the same user-defined Docker bridge network. The container's /etc/resolv.conf points to 127.0.0.11. Which Docker feature is responsible for providing this DNS resolution?
Docker runs an embedded DNS server for user-defined networks, which listens on 127.0.0.11 and resolves container names and aliases. It allows containers on the same network to communicate using their names. This server is automatically configured in the container's /etc/resolv.conf. It is the correct mechanism for service discovery within a user-defined bridge network.
Why this answer
Docker's embedded DNS server provides name resolution for containers on user-defined networks. It listens on 127.0.0.11 and resolves container names and aliases, enabling service discovery. This is automatically configured and does not require an external DNS server.
The host's resolver or a separate DNS container would not be used by default in this scenario.
Exam trap
The trap here is assuming that the host's DNS resolver or an external DNS server is used for container name resolution, overlooking Docker's built-in DNS for user-defined networks.