From b35734a25ccd0cbc8f6c90c34b4d95194ffe1985 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 6 Oct 2026 18:06:37 +0200 Subject: [PATCH] fix(infra): build the Caddy image with pinned DNS plugins `./stack up infra` failed to build its Caddy image: xcaddy takes each DNS plugin's newest release, and `caddy-dns/hetzner/v2` v2.0.0 and later require Caddy 2.11.2, while the image was built on the 2.10 line. Build on the Caddy 2.11 line and pin the plugins (hetzner v2.0.1, cloudflare v0.2.4), so a plugin release cannot break the build again. --- stacklets/infra/Dockerfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/stacklets/infra/Dockerfile b/stacklets/infra/Dockerfile index e6efaf39..afd7d517 100644 --- a/stacklets/infra/Dockerfile +++ b/stacklets/infra/Dockerfile @@ -8,13 +8,17 @@ # The hetzner module is v2, which talks to the Hetzner Cloud API. v1 used # the DNS Console API, which Hetzner has deprecated. # -# Pinned to the Caddy 2.10 line. Every subdomain reusing the wildcard -# certificate needs 2.10 or later. +# Pinned to the Caddy 2.11 line. Every subdomain reusing the wildcard +# certificate needs 2.10 or later, and hetzner v2 requires 2.11.2. +# +# The plugins are pinned too. Unpinned, xcaddy takes each plugin's newest +# release, and one that requires a newer Caddy breaks the build for every +# install: hetzner v2.0.0 did that to the 2.10 image. -FROM caddy:2.10-builder AS builder +FROM caddy:2.11-builder AS builder RUN xcaddy build \ - --with github.com/caddy-dns/hetzner/v2 \ - --with github.com/caddy-dns/cloudflare + --with github.com/caddy-dns/hetzner/v2@v2.0.1 \ + --with github.com/caddy-dns/cloudflare@v0.2.4 -FROM caddy:2.10 +FROM caddy:2.11 COPY --from=builder /usr/bin/caddy /usr/bin/caddy