This is the Porkbun DDNS Python API wrapped into a lightweight, multiplattform docker image based on the Official Python 3 Alpine Docker Image.
This is based off a forked official Porkbun project that is no longer supported, so be warned.
This forked image has been changed to check the current DNS value of a domain to see if the update can be skipped.
version: "3"
services:
porkbunddns:
image: dazznap/porkbun-ddns
container_name: porkbun-ddns
restart: always
pull_policy: always
environment:
APIKey: <YourAPIKey>
SecretAPIKey: <YourSecretAPIKey>
Domain: <YourDomain>
Schedule: <YourSchedule (in cron syntax)> #optional
TZ: <YourTimezone> #optional
docker run -d \
-e APIKey='<YourAPIKey>' \
-e SecretAPIKey='<YourSecretAPIKey>' \
-e Domain='<YourDomain>' \
-e Schedule='<YourSchedule (cron syntax)>' \
-e TZ='<YourTimezone>' \
--pull=always \
--restart always \
--name porkbun-ddns \
dazznap/porkbun-ddns
git clone https://github.com/Dasnap/Porkbun-DDNS-Docker
cd Porkbun-DDNS-Docker
docker build . -t porkbun-ddns
Argument | description | example | default | optional |
---|---|---|---|---|
APIKey |
The API key provided to you by porkbun | pk1_abcdef123456 | None | no |
SecretAPIKey |
The secret API key provided to you by porkbun | sk1_abcdef123456 | None | no |
Domain |
The Domain you want to map to your IP adress, as seen here | google.com domains (would be domains.google.com) |
None | no |
Schedule |
Schedule to execute the script to sync DNS A records with your IP address in cron format | */10 * * * * (every 10 minutes) |
*/5 * * * * (every 5 minutes) |
yes |
TZ |
Your Timezone as tz database name (only really needed, if used in schedule) |
Europe/Berlin | UTC | yes |