- README.md explains the image is built from the separate fork repo at git.alexzaw.dev/alexz/cloudflare-ddns, lists what's in the image, and documents how to rebuild + redeploy. - build.sh clones (or refreshes) /tmp/cfddns-build from the fork via SSH, runs docker build, and pushes to git.alexzaw.dev/alexz/cloudflare-ddns:latest. Supports IMAGE_NAME/IMAGE_TAG/SOURCE_REPO overrides and passes positional args through to docker build (e.g. --no-cache). - .gitignore for build artifacts.
67 lines
2.1 KiB
Markdown
67 lines
2.1 KiB
Markdown
# cfddns — Build Files
|
|
|
|
The Docker image for this app is **not built from this directory**. The
|
|
Dockerfile and Go source live in a separate Gitea-hosted fork at
|
|
[`git.alexzaw.dev/alexz/cloudflare-ddns`](https://git.alexzaw.dev/alexz/cloudflare-ddns)
|
|
(hard fork of [`favonia/cloudflare-ddns`](https://github.com/favonia/cloudflare-ddns)
|
|
with an added `cmd/manager` binary that wraps the original `ddns` updater
|
|
with a web UI for managing the domain list).
|
|
|
|
The published image is `git.alexzaw.dev/alexz/cloudflare-ddns:latest`.
|
|
|
|
## What the image contains
|
|
|
|
- `/bin/ddns` — the unmodified upstream Cloudflare DDNS updater.
|
|
- `/bin/manager` — the wrapper: web UI (HTTP basic auth) on port 8080, YAML
|
|
config at `/config/cfddns.yaml`, supervises `ddns` as a subprocess and
|
|
restarts it cleanly on config changes.
|
|
- Base: `alpine:3.23` (needed because the Runtipi healthcheck shells out to
|
|
`wget --spider` — `scratch` has no userland).
|
|
- Multi-arch: currently `linux/amd64` only. Add `linux/arm64` by extending
|
|
the buildx build with `--platform`.
|
|
|
|
## Building
|
|
|
|
```bash
|
|
cd /etc/runtipi/repos/runtipi/apps/cfddns/build
|
|
./build.sh
|
|
```
|
|
|
|
This clones (or updates) the fork into `/tmp/cfddns-build`, runs `docker
|
|
build`, and pushes the resulting image to
|
|
`git.alexzaw.dev/alexz/cloudflare-ddns:latest`. Docker push credentials must
|
|
already be present in `/root/.docker/config.json` (the script runs with
|
|
`sudo`).
|
|
|
|
To target a different tag or registry:
|
|
|
|
```bash
|
|
IMAGE_TAG=v1-ui2 ./build.sh
|
|
IMAGE_NAME=git.alexzaw.dev/alexz/cfddns IMAGE_TAG=test ./build.sh
|
|
```
|
|
|
|
To pass extra flags to `docker build` (e.g. `--no-cache`):
|
|
|
|
```bash
|
|
./build.sh --no-cache
|
|
```
|
|
|
|
## After building
|
|
|
|
Follow the standard custom-app deploy chain:
|
|
|
|
```bash
|
|
cd /etc/runtipi/repos/runtipi
|
|
sudo git push origin main # only if app definition changed
|
|
cd /etc/runtipi
|
|
sudo ./runtipi-cli appstore update
|
|
sudo ./runtipi-cli app update cfddns:runtipi
|
|
```
|
|
|
|
The new image is pulled automatically by `app update`.
|
|
|
|
## Source
|
|
|
|
- Fork: <https://git.alexzaw.dev/alexz/cloudflare-ddns>
|
|
- Upstream: <https://github.com/favonia/cloudflare-ddns>
|