Sign inSign up

kai5263499/image-ddns

By kai5263499

Updated over 6 years ago

Update CloudFlare A record using IP from image file

Image
0

225

kai5263499/image-ddns repository overview

image-ddns

Updates a CloudFlare A record with an IP address in an image.

I made this after getting a minecraft server for my kids on a hosting provider that charges extra for a static IP address. I'm cheap, and also a programmer, so I wrote this to take the status banner image they provide, OCR it to pull out the text from the image, find the IP address, and use that IP address to update a record in CloudFlare DNS.

The environment variables this command relies on are:

export CLOUDFLARE_API_EMAIL="CF_EMAIL"
export CLOUDFLARE_API_KEY="CF_KEY"
export NAME="SUBDOMAIN TO UPDATE"
export ZONE="DOMAIN TO UPDATE"
export IMAGE_URL="IMAGE TO OCR"
export LOG_LEVEL=debug

After these are set, you can build and run the image with

make image-ddns

Tag summary

Content type

Image

Digest

Size

16.5 MB

Last updated

over 6 years ago

docker pull kai5263499/image-ddns