A simple alpine based dockerfile for creating ddclient, just four files needed.
This Dockerfile always builds the latest version of ddclient from source.
Just download the Dockerfile from this repo. You can save it in /your/desired/Dockerfile/location
.
Change into the directory of your choosing to get started with the setup. Then create and configure your ddclient.conf based on the ddclient official documentation. Or download the sample configuration from the official ddclient git.
cd /your/desired/setup/location && touch ddclient.conf && nano ddclient.conf
In order for ddclient to remember it's last update this file must be created;
cd /your/desired/setup/location && touch ddclient.cache
Create a docker-compose.yaml
file somewhere on your localhost to read the Dockerfile and create an image.
ddclient:
container_name: ddclient
build: /your/desired/Dockerfile/location
volumes:
- '/your/desired/setup/location/ddclient.conf:/etc/ddclient/ddclient.conf:rw'
- '/your/desired/setup/location/ddclient.cache:/var/cache/ddclient/ddclient.cache:rw'
Build the image and start the container;
sudo docker compose buil ddclient && sudo docker compose up -d ddclient
You can apply any user:
in your docker-compose.yaml so long as your ddclient.conf
and ddclient.cache
are owned by that user.
sudo chown -R desired_user:desired_group /your/desired/setup/location/ddclient*