dnsdock – DNS discovery for Docker containers

dnsdock is a DNS server for automatically discovering containers managed by Docker. It monitors the Docker API and maintains DNS records based on the containers visible to the daemon. Applications can then resolve container addresses using names derived from container and image information, avoiding the need to maintain static DNS records for containers whose addresses change.

The software is designed primarily for discovery within a single Docker host. It uses an in-memory registry rather than a distributed database, so its operation does not require a separate coordination service. DNS names can contain a container name, image name, environment identifier and domain suffix, with the option to omit parts of the name when performing lookups. When several containers match a request, dnsdock can return multiple addresses. Wildcard queries provide another way to locate groups of containers.

dnsdock also supports Docker labels that override automatically generated names or define aliases. An integrated HTTP API allows services to be inspected and modified independently of Docker discovery. Queries that do not match local records can be forwarded to another DNS server, allowing dnsdock to handle container names alongside ordinary external DNS lookups.

This is free and open source software.

Key Features

  • Discover containers automatically through the Docker API.
  • Maintain DNS records for detected container instances.
  • Resolve container names to their internal IPv4 addresses.
  • Construct DNS names from container and image information.
  • Use configurable environment and domain suffixes.
  • Match DNS queries containing partial container names.
  • Support wildcard queries for container discovery.
  • Return multiple addresses when several containers match a query.
  • Use Docker labels to define alternative DNS names.
  • Associate multiple aliases with individual containers.
  • Exclude selected containers from discovery using labels.
  • Override the address returned for a container using metadata.
  • Configure DNS record time-to-live values.
  • Override TTL settings for individual services.
  • Forward unmatched DNS queries to an upstream resolver.
  • Provide an integrated DNS server without requiring a separate DNS backend.
  • Store discovery information in memory for single-host operation.
  • Expose an HTTP API for service inspection and management.
  • Add, update and remove service records through the HTTP API.
  • Monitor Docker events to update discovery information.
  • Connect to Docker through a Unix socket or TCP endpoint.
  • Support certificate-based TLS authentication when connecting to Docker.
  • Optionally include stopped containers in discovery information.

Website: github.com/aacebedo/dnsdock
Support:
Developer: Tõnis Tiigi and contributors
License: MIT License

dnsdock is written in Go. Learn Go with our recommended free books and free tutorials.


Related Software

Service Discovery
etcdDistributed reliable key-value store
ConsulOffers service discovery, service mesh, traffic management, and more
NacosDynamic service discovery, configuration management, and service governance
EurekaRESTful (Representational State Transfer) service
SerfDecentralized membership, failure detection and orchestration
ZooKeeperCentralized service for maintaining configuration information
AvahiImplements zero-configuration networking using mDNS/DNS-SD
dnsdockDNS server for automatic docker container discovery

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted