No description
  • Go 93.4%
  • Dockerfile 2.9%
  • HTML 2.6%
  • Makefile 1.1%
Find a file
2026-04-28 11:44:48 +02:00
.claude add claude roles and descriptions 2026-04-26 18:11:07 +02:00
.forgejo/workflows Add verify workflow for PRs 2026-04-26 18:48:59 +02:00
cmd/docker-dns-resolver Replace gitlab.com module path with forgejo.thatjames.nl 2026-04-26 18:15:52 +02:00
internal Paginate Route53 ListHostedZones and DigitalOcean Domains.Records 2026-04-28 11:20:34 +02:00
.gitignore Intial commit 2025-11-26 00:58:41 +01:00
CLAUDE.md add claude roles and descriptions 2026-04-26 18:11:07 +02:00
Dockerfile Intial commit 2025-11-26 00:58:41 +01:00
go.mod Replace gitlab.com module path with forgejo.thatjames.nl 2026-04-26 18:15:52 +02:00
go.sum Add provider registry, label-driven dispatch, DigitalOcean provider 2026-04-25 18:24:25 +02:00
Makefile Add Forgejo deploy workflow with versioned builds 2026-04-25 13:45:50 +02:00
README.md Add provider registry, label-driven dispatch, DigitalOcean provider 2026-04-25 18:24:25 +02:00

Docker DNS Resolver

This is a simple DNS resolver that syncs Docker container labels to one or more DNS providers (currently AWS Route53 and DigitalOcean).

Container labels

  • domain (required) — the FQDN to register for the container, e.g. domain=api.example.com.
  • dns.provider (optional) — which configured provider should handle the record, e.g. dns.provider=route53. If omitted, the value of DEFAULT_DNS_PROVIDER is used; if neither is set, the container is skipped with a log line.

Environment variables

  • ROOT_RECORD (required) — the target the CNAMEs point at, e.g. the load balancer hostname.
  • DNS_PROVIDERS (required) — comma-separated list of providers to enable, e.g. route53,digitalocean.
  • DEFAULT_DNS_PROVIDER (optional) — fallback for containers without a dns.provider label. Must name a provider listed in DNS_PROVIDERS.
  • AWS_ROUTE53_HOSTED_ZONE_ID (route53, optional) — pin to a specific zone and skip ListHostedZones. Standard AWS SDK env vars (AWS_REGION, AWS_ACCESS_KEY_ID, ...) configure credentials.
  • DO_TOKEN (digitalocean, required when enabled) — a DigitalOcean personal access token with read+write scope on the Domains resource.

Example

docker run -d \
  --label domain=api.example.com \
  --label dns.provider=digitalocean \
  my/image