Giter Club home page Giter Club logo

dddns's Introduction

Docker Dynamic DNS for DynDNS

This is a very simple lightweight alpine/shell script mechanism for maintaining an up to date A record for a single host on DynDNS using the DynDNS checkip service.

Usage

docker run -d \
	-e HOST=hostname.to.update.com \
	-e USERNAME=someuser \
	-e APIKEY=XXXXXXX \
	--restart unless-stopped \
	cbearman/dddns:latest

Additional options

To specify an update interval, other than the default of every 600 seconds:

	-eINTERVAL=1200

To specify an alternative DNS server to use (by default your default DNS server is used), then:

	-eRESOLVER=8.8.8.8

To specify the timezone for logging, use TIMEZONE, for example

	-eTIMEZONE=America/Chicago

Using docker swarm secrets

Instead of passing your APIKEY as an environment variable, consider using docker swarm secrets if you are using docker swarm.

Example:

echo -n "MY_API_KEY" | docker secret create dddns_api_key -
docker service create \
	--name dddns \
	--secret ddns_api_key \
	-e APIKEY_SECRET=dddns_api_key \
	-e USERNAME=someuser \
	-e HOST=hostname.to.update.com \
	cbearman/dddns:latest

This creates a swarm secret with the name "ddns_api_key" and then creates a swarm service named "dddns" with access to that secret. In this way, your API Key is not easily obtainable from outside the container (i.e. an inspection of the service or container will not reveal the key).

For this to work you must provide the USERNAME and HOST environment variables and also the APIKEY_SECRET environment variable that defines the name of the secret.

dddns's People

Contributors

cjbearman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.