I would try removing plugins from the build, one by one, until it works. (or do it binary-style if you’ve got a lot.) Then you know which one is culprit. Sometimes we see situations where minor dependency upgrades require plugins to have to upgrade their dependencies or it breaks go.mod tooling, unfortunately.
hi @matt , just want to confirm that I’m seeing the same behaviour as @mattvb91 is seeing. I’ve been getting pretty much the same error in both automated and manual builds since v2.6.3 release.
The following Dockerfile:
FROM caddy:builder AS builder
RUN xcaddy build \
--with github.com/caddy-dns/acmedns
FROM caddy:latest
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
FROM caddy:2.6.2-builder AS builder
RUN xcaddy build \
--with github.com/caddy-dns/acmedns
FROM caddy:2.6.2
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
runs and builds without any problems. In other words, v2.6.2 and older works without a problem, v2.6.3 throws an error.
with some temporary workarounds. So for now I’m good. This is my working (temporary) Dockerfile for now:
FROM caddy:builder AS builder
RUN xcaddy build \
--with github.com/caddy-dns/acmedns \
--with github.com/caddyserver/caddy/v2=github.com/caddyserver/caddy/v2@v2.6.3
FROM caddy:latest
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
Congratulation, updating my server took less than a minute and nothing was needed to be changed! Continue the great development, thanks to all working on this!
I’m not sure what you mean by “previous”, but yeah, the deprecated lego plugin is deprecated precisely because of that reason (and all the implications that go along with it).
I run daily automated builds, so if you’d like to run some quick tests with caddy, acme-dns provider and NameCheap, please feel free to use my caddy-dns-acmedns.
I don’t know how long we’re going to experience this build issue, so I’ve updated @matt 's workaround in my Dockerfile to use CADDY_VERSION rather than the hardcoded version value:
FROM caddy:builder AS builder
RUN xcaddy build \
--with github.com/caddy-dns/acmedns \
--with github.com/caddyserver/caddy/v2=github.com/caddyserver/caddy/v2@${CADDY_VERSION}
FROM caddy:latest
COPY --from=builder /usr/bin/caddy /usr/bin/caddy