Syncs the current IP address, based on the local network interface, to Google Cloud DNS records.
Run this application's container using the command sync
(entrypoint /app
), host
network and restart policy always
. It will then sync the IP address automatically whenever it changes.
For a list of other commands, run the help
command.
Name of the network interface whose IP to use. If not defined, the program will detect the primary network interface automatically.
Example: eth0
List of domain names to update. Separate the domain names with one space. Each name must end with a period. The DNS records must already exist on Cloud DNS and they must be type A
records.
Example: example.com. subdomain.example.com. example.org.
The name of your Google Cloud project. The above mentioned DNS names must be hosted under this project's Cloud DNS.
Example: your-project-123456
Path to service account credentials with permissions to update your Cloud DNS records.
Example: /path/to/dns-updater-gcp-keys.json
In the GCP console, under IAM & admin > Service accounts, create a service account for the application. Name it
dns-updater
, grant it the DNS > DNS Administrator role, create a key for it in JSON format and save it asdns-updater-gcp-keys.json
.
Run tests and build the project
docker-compose build --force-rm
Run the application
docker-compose run --rm app help
The application container doesn't have sh
or other fancy stuff,
so to inspect its contents use the docker export
command:
docker export <container> | tar tv