Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Designed to be run on a CoreOS cluster. Useful if you want to point a domain to the host that your webserver is running on.

You will need to specify the appropriate environment variables when running the container.

/usr/bin/docker run -t -e CF_TOKEN=${CF_TOKEN} -e CF_EMAIL=${CF_EMAIL} -e CF_ZONE=${CF_ZONE} -e ETCD_HOST=${ETCD_HOST} -e ETCD_PORT=${ETCD_PORT} --name cloudflare-dns-etcd jrelva/cloudflare-dns-etcd

${CF_TOKEN} = CloudFlare API token, find in your account settings
${CF_EMAIL} = Your CloudFlare e-mail address
${CF_ZONE} = Your domain (e.g mydomain.com)
${ETCD_HOST} = The IP address for the etcd server, on CoreOS this is '172.17.42.1' (docker0)
${ETCD_PORT} = The etcd server port, normally 4001

This will look at all keys in '/services/web/dns' and update your CloudFlare DNS records to reflect the key/value pair.

Some considerations:

  • The record will always be an A record.
  • Your fqdn must always be specified.
  • This will never delete records.
  • New etcd entries are checked every 30 seconds.
  • Will overwrite any DNS entries that already exist.
  • Clients will cache the DNS record, I think there's a no-cache option in CloudFlare, more investigation needed.

An example command to insert a new dns record

etcdctl set /services/web/dns/subdomain.mydomain.com "8.8.8.8"  

This container is in beta, and if you don't do everything right it will fail.

Docker Pull Command
Owner
jrelva
Source Repository

Comments (0)