Skip to content

engine: document the embedded DNS server and its metrics - #26136

Open
randomizedcoder wants to merge 2 commits into
docker:mainfrom
randomizedcoder:engine-embedded-dns-docs
Open

randomizedcoder wants to merge 2 commits into
docker:mainfrom
randomizedcoder:engine-embedded-dns-docs

Conversation

@randomizedcoder

Copy link
Copy Markdown

Description

G'day! Docker's embedded DNS server (127.0.0.11) is only mentioned in passing in the networking docs today: containers on user-defined networks use it, and it forwards to the host's servers. What it actually resolves itself, which upstream servers it uses and from which network namespace, how it fails over between them, and what --dns changes, aren't documented anywhere. This PR adds that, in two commits with different merge timelines:

  1. engine: document the embedded DNS server. New page content/manuals/engine/network/dns.md, "DNS resolution in containers": when the embedded server is used, record types answered locally (A, AAAA, PTR, SRV, MX), upstream server selection (host resolv.conf vs --dns / daemon.json), the in-order failover rules and timeouts, internal networks, limits, ndots behaviour, and troubleshooting; plus a link from the "DNS services" section of the networking overview. Everything on the page describes current behaviour, checked against the Engine source (daemon/libnetwork/resolver.go, sandbox.go, internal/resolvconf), so this commit can be published on its own.
  2. engine: document embedded DNS server metrics. New "Embedded DNS server metrics" section on the Prometheus page listing the libnetwork_resolver_* metrics and their labels, with an example query for upstream failovers, and pointers to it from the failover and troubleshooting sections of the new page. This commit must wait for the Engine change to ship.

Related issues or tickets

Reviews

  • Technical review
  • Editorial review
  • Product review

A cute puppy


Created with: Claude Code

Add a page describing Docker Engine's embedded DNS server for
user-defined networks: when it's used, which record types it answers
itself, where its upstream servers come from, how it fails over
between them, how --dns changes forwarding, the ndots behaviour, and
troubleshooting steps. Link it from the "DNS services" section of the
networking overview.

Everything on the page describes current behaviour, so it can be
published independently of any engine change.

Assisted-By: Claude Code
Signed-off-by: Dave Seddon <dave.seddon.ca@gmail.com>
Add an "Embedded DNS server metrics" section to the Prometheus page,
listing the libnetwork_resolver_* metrics and their labels, with an
example query for the rate of upstream failovers. Point to the metrics
from the failover and troubleshooting sections of the DNS page.

This depends on the corresponding Docker Engine change (moby/moby:
"libnetwork: add Prometheus metrics to resolver") and should not be
published before that change ships in a release.

Assisted-By: Claude Code
Signed-off-by: Dave Seddon <dave.seddon.ca@gmail.com>
@netlify

netlify Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 4564a38
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/6ab04e790a788b0008db323f
😎 Deploy Preview https://deploy-preview-26136--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added area/engine Issue affects Docker engine/daemon area/networking Relates to anything around networking labels Sep 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/engine Issue affects Docker engine/daemon area/networking Relates to anything around networking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant