1. The problem I’m having:
I built caddy with xcaddy from caddy:builder with some additional modules:
FROM caddy:builder AS builder
#https://moth.monster/blog/caddy-geoip/
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
xcaddy build --output /caddy --with=github.com/caddy-dns/luadns \
--with=github.com/porech/caddy-maxmind-geolocation \
--with=github.com/caddy-dns/porkbun
FROM scratch AS out
COPY --from=builder /caddy /caddy
caddy version does not include the module information I’d expect: v2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8= vs caddy version -h telling me that:
However, if Caddy is built in the
way specified by our online documentation (or by using xcaddy), more
detailed version information is printed as given by Go modules.
list-modules does work, though:
Standard modules: 127
dns.providers.luadns
dns.providers.porkbun
http.matchers.maxmind_geolocation
Non-standard modules: 3
2. Error messages and/or full log output:
#6 [builder 2/2] RUN xcaddy build --output /caddy --with=github.com/caddy-dns/luadns --with=github.com/porech/caddy-maxmind-geolocation --with=github.com/caddy-dns/porkbun
#6 0.650 2025/10/18 02:50:15 [INFO] absolute output file path: /caddy
#6 0.651 2025/10/18 02:50:15 [INFO] Temporary folder: /tmp/buildenv_2025-10-18-0250.2133387221
#6 0.651 2025/10/18 02:50:15 [INFO] Writing main module: /tmp/buildenv_2025-10-18-0250.2133387221/main.go
#6 0.651 package main
#6 0.651
#6 0.651 import (
#6 0.651 caddycmd "github.com/caddyserver/caddy/v2/cmd"
#6 0.651
#6 0.651 // plug in Caddy modules here
#6 0.651 _ "github.com/caddyserver/caddy/v2/modules/standard"
#6 0.651 _ "github.com/caddy-dns/luadns"
#6 0.651 _ "github.com/porech/caddy-maxmind-geolocation"
#6 0.651 _ "github.com/caddy-dns/porkbun"
#6 0.651 )
#6 0.651
#6 0.651 func main() {
#6 0.651 caddycmd.Main()
#6 0.651 }
#6 0.651 2025/10/18 02:50:15 [INFO] Initializing Go module
#6 0.651 2025/10/18 02:50:15 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod init caddy
#6 0.673 go: creating new go.mod: module caddy
#6 0.674 go: to add module requirements and sums:
#6 0.674 go mod tidy
#6 0.675 2025/10/18 02:50:15 [INFO] Pinning versions
#6 0.675 2025/10/18 02:50:15 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v github.com/caddyserver/caddy/v2@v2.10.2
...
#6 38.77 2025/10/18 02:50:53 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /caddy -ldflags -w -s -trimpath -tags nobadger,nomysql,nopgx
#6 52.07 2025/10/18 02:51:06 [INFO] Build complete: /caddy
#6 52.07 2025/10/18 02:51:06 [INFO] Skipping cleanup as requested; leaving folder intact: /tmp/buildenv_2025-10-18-0250.2133387221
#6 52.07 2025/10/18 02:51:06 [INFO] Setting capabilities (requires admin privileges): [setcap cap_net_bind_service=+ep /caddy]
#6 52.07
#6 52.07 /caddy version
#6 52.11 v2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
3. Caddy version:
v2.10.2 h1:g/gTYjGMD0dec+UgMw8SnfmJ3I9+M2TdvoRL/Ovu6U8=
4. How I installed and ran Caddy:
Dockerfile above
a. System environment:
Debian 13, Docker 28.5.1
b. Command:
caddy version
c. Service/unit/compose file:
N/A
d. My complete Caddy config:
N/A
5. Links to relevant resources:
N/A