mirror of
https://github.com/dalbodeule/sh0rt.kr-pdns.git
synced 2026-11-05 22:29:34 +09:00
feat: Add multi-architecture Docker image build script and update README
This commit is contained in:
3 files changed
+108
-6
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Cloudflare compatible PowerDNS API Server
|
||||
|
||||
[](https://discord.gg/EPnCfz7xx5) [](https://teamcity.mori.space/project/PdnsApi)
|
||||
[](https://discord.gg/EPnCfz7xx5)
|
||||
|
||||
A Kotlin and Spring Boot API that exposes Cloudflare-style zone and DNS record endpoints backed by PowerDNS and MariaDB. API requests use `Authorization: Bearer <API_KEY>`.
|
||||
|
||||
@@ -26,6 +26,23 @@ Use JDK 25. The Gradle wrapper selects the Java 25 toolchain for compilation.
|
||||
| `PDNS_API_URL` | PowerDNS HTTP API base URL, for example `http://pdns:8081` |
|
||||
| `PDNS_NS` | Comma-separated nameservers, for example `ns1.example.com,ns2.example.com` |
|
||||
|
||||
## Publish AMD64 and ARM64 images
|
||||
|
||||
The script builds a Linux native image for each architecture with Paketo Buildpacks, pushes the architecture-specific tags with Docker CLI credentials, then publishes a multi-platform manifest. Docker, Buildx, and a registry login with push access to the target repository are required. On a host with a different architecture, Docker must support emulation for the target platform.
|
||||
|
||||
```sh
|
||||
./scripts/build-multiarch-image.sh 1.0.0
|
||||
```
|
||||
|
||||
The default repository is `${DOCKER_USERNAME:-dalbodeule}/dnsapi`. Set `IMAGE_REPOSITORY` to use another repository, such as `git.mori.space/dalbodeule/dnsapi`. The script publishes `:1.0.0-amd64`, `:1.0.0-arm64`, `:1.0.0`, and `:latest`; set `PUBLISH_LATEST=0` to leave `:latest` unchanged. Review the commands without publishing by setting `DRY_RUN=1`.
|
||||
|
||||
If a previous run built an architecture image locally but failed while pushing, log in to the registry and rerun with `RESUME=1`. The script checks the local image architecture and skips its costly rebuild.
|
||||
|
||||
```sh
|
||||
docker login --username dalbodeule
|
||||
RESUME=1 ./scripts/build-multiarch-image.sh 1.0.0
|
||||
```
|
||||
|
||||
## Update API documentation
|
||||
|
||||
```sh
|
||||
|
||||
Reference in new issue
Block a user