Skip to content

Proposal: docker embedded DNS server #17195

@phemmer

Description

@phemmer

There are numerous open issues in regards to docker and DNS handling within containers: (#17190 #16619 #15978 #14627 #15819 and likely many others which I was fuzzy on)

One solution I think which would solve all these issues would be if docker acted as a DNS server. It would answer lookup requests for linked containers, and when the request isn't for a linked container, it would forward it upstream (to the host's name servers).

The /etc/hosts file inside the container would then be static, containing only the container itself.
We could also not touch /etc/hosts at all, and leave the container's entry to DNS. This would allow image builds to manipulate the file and persist the changes.

For performance, it would probably be good if docker cached the upstream DNS records. Records come back with a TTL, so docker should cache the record until this TTL expires.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingNetworkingkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shiny

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions