Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.

acolomba/docker-cloudflare

 
 

Repository files navigation

joshuaavalon/cloudflare-ddns

version Docker Pulls Docker Stars Docker Automated build Docker build MIT

The is a simple docker using curl to update DNS record on Cloudflare. Inspired by rasmusbe/cloudflare-update-record.sh

Compare to nouchka/cloudflare-dyndns (4.0):

  • Smaller size: 4MB vs 54MB
  • Able to update subdomain
  • Update when IP is changed

Usage

Running once interactively

docker run \
    -e RUNONCE=1 \
    -e ZONE=example.com \
    -e HOST=example.com \
    -e [email protected] \
    -e API=1111111111111111 \
    -e TTL=1 \
    -e PROXY=true \
joshuaavalon/cloudflare-ddns

Running as a daemon

docker run \
    -d \
    -e ZONE=example.com \
    -e HOST=example.com \
    -e [email protected] \
    -e API=1111111111111111 \
    -e TTL=1 \
    -e PROXY=true \
joshuaavalon/cloudflare-ddns

Parameters

ZONE: Domain, e.g. example.com.

HOST: DNS record to be updated, e.g. example.com, subdomain.example.com.

EMAIL: Cloudflare Email.

API: Cloudflare API key.

TTL: (OPTIONAL) Time to live for DNS record. Value of 1 is 'automatic'. Min value:120; Max value:2147483647. Default: 1

PROXY: (OPTIONAL) Whether the record is receiving the performance and security benefits of Cloudflare. true to enable; false to disable. Default: true

FORCE_CREATE: (OPTIONAL) When set, a record will be created if one does not exist already.

RUNONCE: (OPTIONAL) When set, only a single update is attempted, and the script exists without setting up a cron process.

Running on a raspberry pi

Unfortunately dockerhub doesn't support automatic builds for the ARM architecture so this container has to be built manually. Luckily the container is easy and quick to build.

To build simply clone this repo:

git clone https://github.com/joshuaavalon/docker-cloudflare.git

Then build the container using the alternate Dockerfile:

docker build \
    -f Dockerfile.arm32v6 \
    -t joshuaavalon/cloudflare-ddns:arm32v6

The newly built container can now be used by substituting joshuaavalon/cloudflare-ddns for joshuaavalon/cloudflare-ddns:arm32v6 in the usage commands.

Packages

No packages published

Languages

  • Shell 92.6%
  • Dockerfile 7.4%