No description
- Go 93.4%
- Dockerfile 2.9%
- HTML 2.6%
- Makefile 1.1%
|
All checks were successful
deploy / deploy (push) Successful in 16s
Reviewed-on: https://forgejo.thatjames.nl/thatjames/docker-dns-resolver/pulls/5 |
||
|---|---|---|
| .claude | ||
| .forgejo/workflows | ||
| cmd/docker-dns-resolver | ||
| internal | ||
| .gitignore | ||
| CLAUDE.md | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| Makefile | ||
| README.md | ||
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 ofDEFAULT_DNS_PROVIDERis 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 adns.providerlabel. Must name a provider listed inDNS_PROVIDERS.AWS_ROUTE53_HOSTED_ZONE_ID(route53, optional) — pin to a specific zone and skipListHostedZones. 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