Unable to build Caddy v.2.10 image with Porkbun and Crowdsec

1. The problem I’m having:

Trying to build a new Docker image based on Caddy 2.10.0 with Porkbun DNS and the Crowdsec bouncer.

2. Error messages and/or full log output:

docker build -t caddy-porkbun:v2.10.0 .
[+] Building 52.9s (7/8)                                                           docker:default
 => [internal] load build definition from Dockerfile                                         0.1s
 => => transferring dockerfile: 394B                                                         0.0s
 => [internal] load metadata for docker.io/library/caddy:builder-alpine                      1.1s
 => [internal] load metadata for docker.io/library/caddy:latest                              1.1s
 => [internal] load .dockerignore                                                            0.0s
 => => transferring context: 2B                                                              0.0s
 => CACHED [builder 1/2] FROM docker.io/library/caddy:builder-alpine@sha256:16205c8e035dae7  0.0s
 => CACHED [stage-1 1/2] FROM docker.io/library/caddy:latest@sha256:e759110e56bae353dbceddf  0.0s
 => ERROR [builder 2/2] RUN xcaddy build     --with github.com/caddy-dns/porkbun     --wit  51.5s
------
 > [builder 2/2] RUN xcaddy build     --with github.com/caddy-dns/porkbun     --with github.com/hslatman/caddy-crowdsec-bouncer/http     --with github.com/hslatman/caddy-crowdsec-bouncer/crowdsec     --with github.com/hslatman/caddy-crowdsec-bouncer/layer4:
0.514 2025/04/29 06:46:41 [INFO] absolute output file path: /usr/bin/caddy
0.514 2025/04/29 06:46:41 [INFO] Temporary folder: /tmp/buildenv_2025-04-29-0646.2996367206
0.514 2025/04/29 06:46:41 [INFO] Writing main module: /tmp/buildenv_2025-04-29-0646.2996367206/main.go
0.514 package main
0.514
0.514 import (
0.514 	caddycmd "github.com/caddyserver/caddy/v2/cmd"
0.514
0.514 	// plug in Caddy modules here
0.514 	_ "github.com/caddyserver/caddy/v2/modules/standard"
0.514 	_ "github.com/caddy-dns/porkbun"
0.514 	_ "github.com/hslatman/caddy-crowdsec-bouncer/http"
0.514 	_ "github.com/hslatman/caddy-crowdsec-bouncer/crowdsec"
0.514 	_ "github.com/hslatman/caddy-crowdsec-bouncer/layer4"
0.514 )
0.514
0.514 func main() {
0.514 	caddycmd.Main()
0.514 }
0.514 2025/04/29 06:46:41 [INFO] Initializing Go module
0.515 2025/04/29 06:46:41 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod init caddy
0.667 go: creating new go.mod: module caddy
0.668 go: to add module requirements and sums:
0.668 	go mod tidy
0.669 2025/04/29 06:46:41 [INFO] Pinning versions
0.669 2025/04/29 06:46:41 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v github.com/caddyserver/caddy/v2@v2.10.0
1.169 go: downloading github.com/caddyserver/caddy/v2 v2.10.0
1.983 go: downloading github.com/caddyserver/certmagic v0.23.0
1.983 go: downloading github.com/cespare/xxhash/v2 v2.3.0
1.983 go: downloading github.com/google/uuid v1.6.0
1.983 go: downloading github.com/prometheus/client_golang v1.19.1
1.987 go: downloading github.com/quic-go/quic-go v0.50.1
1.991 go: downloading go.uber.org/zap v1.27.0
1.994 go: downloading go.uber.org/zap/exp v0.3.0
1.997 go: downloading golang.org/x/sys v0.31.0
2.008 go: downloading golang.org/x/term v0.30.0
2.013 go: downloading github.com/cespare/xxhash v1.1.0
2.014 go: downloading golang.org/x/time v0.11.0
2.265 go: downloading go.uber.org/multierr v1.11.0
2.709 go: downloading github.com/prometheus/common v0.48.0
2.709 go: downloading github.com/prometheus/procfs v0.12.0
2.709 go: downloading github.com/beorn7/perks v1.0.1
2.709 go: downloading google.golang.org/protobuf v1.35.1
2.709 go: downloading github.com/prometheus/client_model v0.5.0
2.803 go: downloading github.com/klauspost/cpuid/v2 v2.2.10
2.803 go: downloading github.com/libdns/libdns v1.0.0-beta.1
2.803 go: downloading github.com/caddyserver/zerossl v0.1.3
2.803 go: downloading github.com/mholt/acmez/v3 v3.1.2
2.821 go: downloading github.com/miekg/dns v1.1.63
2.826 go: downloading github.com/zeebo/blake3 v0.2.4
2.857 go: downloading golang.org/x/crypto v0.36.0
2.997 go: downloading golang.org/x/net v0.38.0
3.030 go: downloading github.com/onsi/ginkgo/v2 v2.13.2
3.034 go: downloading go.uber.org/mock v0.5.0
3.035 go: downloading golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
3.227 go: downloading github.com/quic-go/qpack v0.5.1
3.227 go: downloading github.com/francoispqt/gojay v1.2.13
3.332 go: downloading golang.org/x/tools v0.31.0
3.345 go: downloading golang.org/x/mod v0.24.0
3.373 go: downloading golang.org/x/text v0.23.0
3.792 go: downloading golang.org/x/sync v0.12.0
3.902 go: downloading github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572
3.902 go: downloading github.com/google/pprof v0.0.0-20231212022811-ec68065c825e
6.098 go: added github.com/beorn7/perks v1.0.1
6.098 go: added github.com/caddyserver/caddy/v2 v2.10.0
6.098 go: added github.com/caddyserver/certmagic v0.23.0
6.098 go: added github.com/caddyserver/zerossl v0.1.3
6.098 go: added github.com/cespare/xxhash/v2 v2.3.0
6.098 go: added github.com/francoispqt/gojay v1.2.13
6.098 go: added github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572
6.098 go: added github.com/google/pprof v0.0.0-20231212022811-ec68065c825e
6.098 go: added github.com/google/uuid v1.6.0
6.098 go: added github.com/klauspost/cpuid/v2 v2.2.10
6.098 go: added github.com/libdns/libdns v1.0.0-beta.1
6.098 go: added github.com/mholt/acmez/v3 v3.1.2
6.098 go: added github.com/miekg/dns v1.1.63
6.098 go: added github.com/onsi/ginkgo/v2 v2.13.2
6.098 go: added github.com/prometheus/client_golang v1.19.1
6.098 go: added github.com/prometheus/client_model v0.5.0
6.098 go: added github.com/prometheus/common v0.48.0
6.098 go: added github.com/prometheus/procfs v0.12.0
6.098 go: added github.com/quic-go/qpack v0.5.1
6.098 go: added github.com/quic-go/quic-go v0.50.1
6.098 go: added github.com/zeebo/blake3 v0.2.4
6.098 go: added go.uber.org/mock v0.5.0
6.098 go: added go.uber.org/multierr v1.11.0
6.098 go: added go.uber.org/zap v1.27.0
6.098 go: added go.uber.org/zap/exp v0.3.0
6.098 go: added golang.org/x/crypto v0.36.0
6.098 go: added golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
6.098 go: added golang.org/x/mod v0.24.0
6.098 go: added golang.org/x/net v0.38.0
6.098 go: added golang.org/x/sync v0.12.0
6.098 go: added golang.org/x/sys v0.31.0
6.098 go: added golang.org/x/term v0.30.0
6.098 go: added golang.org/x/text v0.23.0
6.098 go: added golang.org/x/time v0.11.0
6.098 go: added golang.org/x/tools v0.31.0
6.098 go: added google.golang.org/protobuf v1.35.1
6.100 2025/04/29 06:46:46 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v github.com/caddy-dns/porkbun github.com/caddyserver/caddy/v2@v2.10.0
7.356 go: downloading github.com/caddy-dns/porkbun v0.2.1
7.503 go: downloading github.com/libdns/porkbun v0.2.0
8.139 go: added github.com/caddy-dns/porkbun v0.2.1
8.139 go: added github.com/libdns/porkbun v0.2.0
8.141 2025/04/29 06:46:48 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v github.com/hslatman/caddy-crowdsec-bouncer/http github.com/caddyserver/caddy/v2@v2.10.0
9.267 go: downloading github.com/hslatman/caddy-crowdsec-bouncer v0.8.1
10.43 go: accepting indirect upgrade from github.com/prometheus/client_golang@v1.19.1 to v1.20.4
10.43 go: accepting indirect upgrade from github.com/prometheus/client_model@v0.5.0 to v0.6.1
10.43 go: accepting indirect upgrade from github.com/prometheus/common@v0.48.0 to v0.59.1
10.43 go: accepting indirect upgrade from github.com/prometheus/procfs@v0.12.0 to v0.15.1
10.43 go: downloading github.com/crowdsecurity/crowdsec v1.6.3
10.44 go: downloading github.com/google/cel-go v0.24.1
10.44 go: downloading github.com/crowdsecurity/go-cs-bouncer v0.0.14
10.44 go: downloading github.com/crowdsecurity/go-cs-lib v0.0.15
10.44 go: downloading github.com/dustin/go-humanize v1.0.1
10.44 go: downloading github.com/hslatman/ipstore v0.3.0
10.44 go: downloading github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c
10.44 go: downloading github.com/prometheus/client_golang v1.20.4
10.47 go: downloading github.com/sirupsen/logrus v1.9.3
11.21 go: downloading github.com/spf13/cobra v1.9.1
11.24 go: downloading github.com/smallstep/certificates v0.26.1
11.39 go: downloading github.com/smallstep/truststore v0.13.0
11.39 go: downloading go.step.sm/crypto v0.45.0
11.39 go: downloading github.com/cloudflare/circl v1.6.0
11.39 go: downloading github.com/tailscale/tscert v0.0.0-20240608151842-d3f834017e53
11.39 go: downloading github.com/KimMachineGun/automemlimit v0.7.1
11.39 go: downloading github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
11.42 go: downloading github.com/spf13/pflag v1.0.6
11.42 go: downloading go.uber.org/automaxprocs v1.6.0
11.45 go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20250305170421-49bf5b80c810
11.47 go: downloading github.com/prometheus/client_model v0.6.1
11.47 go: downloading github.com/prometheus/common v0.59.1
11.48 go: downloading github.com/prometheus/procfs v0.15.1
11.50 go: downloading gopkg.in/yaml.v2 v2.4.0
11.52 go: downloading github.com/inconshreveable/mousetrap v1.1.0
11.52 go: downloading cel.dev/expr v0.19.1
11.52 go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9
11.53 go: downloading github.com/stoewer/go-strcase v1.3.0
11.55 go: downloading github.com/antlr4-go/antlr/v4 v4.13.0
11.68 go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.6
11.79 go: downloading gopkg.in/yaml.v3 v3.0.1
11.86 go: downloading github.com/gaissmai/bart v0.13.0
11.98 go: downloading github.com/davecgh/go-spew v1.1.1
11.99 go: downloading google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9
11.99 go: downloading github.com/go-openapi/errors v0.22.0
12.04 go: downloading github.com/go-openapi/strfmt v0.23.0
12.05 go: downloading github.com/go-openapi/swag v0.23.0
12.08 go: downloading github.com/go-openapi/validate v0.24.0
12.08 go: downloading github.com/golang-jwt/jwt/v4 v4.5.0
12.08 go: downloading github.com/google/go-querystring v1.1.0
12.10 go: downloading gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
12.16 go: downloading github.com/blackfireio/osinfo v1.0.5
12.18 go: downloading github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
12.18 go: downloading github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
12.21 go: downloading github.com/russross/blackfriday/v2 v2.1.0
12.22 go: downloading github.com/pkg/errors v0.9.1
12.23 go: downloading github.com/smallstep/nosql v0.6.1
12.24 go: downloading github.com/russross/blackfriday v1.5.2
12.27 go: downloading go.step.sm/cli-utils v0.9.0
12.32 go: downloading go.step.sm/linkedca v0.20.1
12.32 go: downloading google.golang.org/grpc v1.67.1
12.38 go: downloading github.com/goccy/go-yaml v1.12.0
12.40 go: downloading github.com/expr-lang/expr v1.16.9
12.43 go: downloading gopkg.in/natefinch/lumberjack.v2 v2.2.1
12.46 go: downloading github.com/slackhq/nebula v1.7.2
12.47 go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9
12.48 go: downloading howett.net/plist v1.0.0
12.58 go: downloading github.com/smallstep/pkcs7 v0.0.0-20231024181729-3b98ecc1ca81
12.61 go: downloading github.com/smallstep/scep v0.0.0-20231024192529-aee96d7ad34d
12.61 go: downloading github.com/Masterminds/sprig/v3 v3.3.0
12.63 go: downloading github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
12.65 go: downloading github.com/mitchellh/mapstructure v1.5.0
12.66 go: downloading github.com/oklog/ulid v1.3.1
12.67 go: downloading go.mongodb.org/mongo-driver v1.17.0
12.70 go: downloading github.com/mailru/easyjson v0.7.7
12.71 go: downloading github.com/go-jose/go-jose/v3 v3.0.4
12.77 go: downloading github.com/go-openapi/analysis v0.23.0
12.79 go: downloading github.com/go-openapi/jsonpointer v0.21.0
12.79 go: downloading github.com/go-openapi/loads v0.22.0
12.81 go: downloading github.com/go-openapi/spec v0.21.0
12.87 go: downloading github.com/rs/xid v1.5.0
12.88 go: downloading filippo.io/edwards25519 v1.1.0
12.88 go: downloading github.com/urfave/cli v1.22.14
12.89 go: downloading github.com/chzyer/readline v1.5.1
12.89 go: downloading github.com/manifoldco/promptui v0.9.0
12.90 go: downloading github.com/Microsoft/go-winio v0.6.2
12.90 go: downloading github.com/mitchellh/go-ps v1.0.0
12.90 go: downloading github.com/bits-and-blooms/bitset v1.14.3
12.90 go: downloading dario.cat/mergo v1.0.1
12.90 go: downloading github.com/Masterminds/goutils v1.1.1
12.91 go: downloading github.com/Masterminds/semver/v3 v3.3.0
12.91 go: downloading github.com/huandu/xstrings v1.5.0
12.92 go: downloading github.com/mitchellh/copystructure v1.2.0
12.92 go: downloading github.com/shopspring/decimal v1.4.0
12.93 go: downloading github.com/spf13/cast v1.7.0
12.94 go: downloading golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da
12.95 go: downloading github.com/josharian/intern v1.0.0
12.95 go: downloading github.com/go-openapi/jsonreference v0.21.0
12.95 go: downloading github.com/dgraph-io/badger v1.6.2
12.96 go: downloading github.com/dgraph-io/badger/v2 v2.2007.4
13.00 go: downloading go.etcd.io/bbolt v1.3.9
13.00 go: downloading github.com/go-sql-driver/mysql v1.7.1
13.05 go: downloading github.com/jackc/pgx/v4 v4.18.3
13.07 go: downloading github.com/go-kit/kit v0.13.0
13.07 go: downloading github.com/mitchellh/reflectwalk v1.0.2
13.08 go: downloading github.com/fatih/color v1.17.0
13.09 go: downloading github.com/dgraph-io/ristretto v0.2.0
13.09 go: downloading github.com/golang/protobuf v1.5.4
13.10 go: downloading github.com/jackc/pgconn v1.14.3
13.12 go: downloading github.com/jackc/pgio v1.0.0
13.13 go: downloading github.com/jackc/pgproto3/v2 v2.3.3
13.13 go: downloading github.com/jackc/pgtype v1.14.0
13.14 go: downloading github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
13.15 go: downloading github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96
13.16 go: downloading github.com/mattn/go-colorable v0.1.13
13.16 go: downloading github.com/mattn/go-isatty v0.0.20
13.16 go: downloading github.com/jackc/chunkreader/v2 v2.0.1
13.16 go: downloading github.com/jackc/pgpassfile v1.0.0
13.17 go: downloading github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a
13.17 go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
13.17 go: downloading github.com/go-kit/log v0.2.1
13.27 go: downloading github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13
13.27 go: downloading github.com/golang/snappy v0.0.4
13.27 go: downloading github.com/klauspost/compress v1.18.0
13.40 go: downloading github.com/go-logfmt/logfmt v0.6.0
17.78 go: upgraded github.com/Microsoft/go-winio v0.6.0 => v0.6.2
17.78 go: added github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
17.78 go: added github.com/bits-and-blooms/bitset v1.14.3
17.78 go: added github.com/blackfireio/osinfo v1.0.5
17.78 go: added github.com/crowdsecurity/crowdsec v1.6.3
17.78 go: added github.com/crowdsecurity/go-cs-bouncer v0.0.14
17.78 go: added github.com/crowdsecurity/go-cs-lib v0.0.15
17.78 go: added github.com/expr-lang/expr v1.16.9
17.78 go: added github.com/fatih/color v1.17.0
17.78 go: added github.com/gaissmai/bart v0.13.0
17.78 go: added github.com/go-openapi/analysis v0.23.0
17.78 go: added github.com/go-openapi/errors v0.22.0
17.78 go: added github.com/go-openapi/jsonpointer v0.21.0
17.78 go: added github.com/go-openapi/jsonreference v0.21.0
17.78 go: added github.com/go-openapi/loads v0.22.0
17.78 go: added github.com/go-openapi/spec v0.21.0
17.78 go: added github.com/go-openapi/strfmt v0.23.0
17.78 go: added github.com/go-openapi/swag v0.23.0
17.78 go: added github.com/go-openapi/validate v0.24.0
17.78 go: added github.com/goccy/go-yaml v1.12.0
17.78 go: added github.com/golang-jwt/jwt/v4 v4.5.0
17.78 go: upgraded github.com/google/go-querystring v1.0.0 => v1.1.0
17.78 go: added github.com/hslatman/caddy-crowdsec-bouncer v0.8.1
17.78 go: added github.com/hslatman/ipstore v0.3.0
17.78 go: added github.com/mitchellh/mapstructure v1.5.0
17.78 go: added github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
17.78 go: added github.com/oklog/ulid v1.3.1
17.78 go: added github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c
17.78 go: upgraded github.com/prometheus/client_golang v1.19.1 => v1.20.4
17.78 go: upgraded github.com/prometheus/client_model v0.5.0 => v0.6.1
17.78 go: upgraded github.com/prometheus/common v0.48.0 => v0.59.1
17.78 go: upgraded github.com/prometheus/procfs v0.12.0 => v0.15.1
17.78 go: upgraded github.com/slackhq/nebula v1.6.1 => v1.7.2
17.78 go: upgraded github.com/stoewer/go-strcase v1.2.0 => v1.3.0
17.78 go: added go.mongodb.org/mongo-driver v1.17.0
17.78 go: upgraded golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 => v0.0.0-20240903120638-7835f813f4da
17.78 go: added gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
17.78 2025/04/29 06:46:58 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v github.com/hslatman/caddy-crowdsec-bouncer/crowdsec github.com/caddyserver/caddy/v2@v2.10.0
18.33 2025/04/29 06:46:58 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v github.com/hslatman/caddy-crowdsec-bouncer/layer4 github.com/caddyserver/caddy/v2@v2.10.0
20.17 go: downloading github.com/mholt/caddy-l4 v0.0.0-20231016112149-a362a1fbf652
21.47 2025/04/29 06:47:02 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -v
21.49 go: downloading github.com/go-chi/chi/v5 v5.2.1
21.54 go: downloading github.com/fxamacker/cbor/v2 v2.6.0
21.54 go: downloading github.com/google/go-tpm v0.9.0
21.54 go: downloading github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935
21.54 go: downloading github.com/pires/go-proxyproto v0.7.1-0.20240628150027-b718e7ce4964
21.54 go: downloading github.com/BurntSushi/toml v1.4.0
21.54 go: downloading go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0
21.54 go: downloading go.opentelemetry.io/contrib/propagators/autoprop v0.42.0
21.54 go: downloading github.com/alecthomas/chroma/v2 v2.15.0
21.54 go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0
21.54 go: downloading github.com/yuin/goldmark v1.7.8
21.54 go: downloading go.opentelemetry.io/otel v1.31.0
21.54 go: downloading github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
21.54 go: downloading go.opentelemetry.io/otel/sdk v1.31.0
22.59 go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0
22.61 go: downloading go.opentelemetry.io/otel/trace v1.31.0
22.68 go: downloading github.com/x448/float16 v0.8.4
22.68 go: downloading github.com/felixge/httpsnoop v1.0.4
22.68 go: downloading go.opentelemetry.io/otel/metric v1.31.0
22.73 go: downloading github.com/go-logr/logr v1.4.2
22.83 go: downloading github.com/go-logr/stdr v1.2.2
22.83 go: downloading go.opentelemetry.io/contrib/propagators/aws v1.17.0
22.83 go: downloading go.opentelemetry.io/contrib/propagators/b3 v1.17.0
22.83 go: downloading go.opentelemetry.io/contrib/propagators/jaeger v1.17.0
22.83 go: downloading go.opentelemetry.io/contrib/propagators/ot v1.17.0
22.84 go: downloading github.com/google/go-tspi v0.3.0
22.95 go: downloading go.opentelemetry.io/proto/otlp v1.3.1
22.95 go: downloading github.com/dlclark/regexp2 v1.11.4
22.95 go: downloading github.com/cenkalti/backoff/v4 v4.3.0
23.43 go: downloading github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0
23.80 go: downloading github.com/grpc-ecosystem/grpc-gateway v1.5.0
23.80 go: downloading github.com/google/certificate-transparency-go v1.1.8-0.20240110162603-74a5dd331745
26.12 2025/04/29 06:47:06 [INFO] Build environment ready
26.12 2025/04/29 06:47:06 [INFO] Building Caddy
26.12 2025/04/29 06:47:06 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -e
26.14 go: downloading github.com/stretchr/testify v1.10.0
26.14 go: downloading go.uber.org/goleak v1.3.0
26.14 go: downloading github.com/joho/godotenv v1.5.1
26.14 go: downloading github.com/google/go-cmp v0.6.0
26.14 go: downloading github.com/jarcoal/httpmock v1.3.1
26.14 go: downloading github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262
26.18 go: downloading github.com/onsi/gomega v1.29.0
26.21 go: downloading github.com/kylelemons/godebug v1.1.0
26.21 go: downloading github.com/google/go-tpm-tools v0.4.4
26.21 go: downloading gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
26.22 go: downloading github.com/peterbourgon/diskv/v3 v3.0.1
26.26 go: downloading github.com/schollz/jsonstore v1.1.0
26.36 go: downloading github.com/zeebo/assert v1.1.0
26.64 go: downloading github.com/prashantv/gostub v1.1.0
26.65 go: downloading github.com/alecthomas/assert/v2 v2.11.0
26.65 go: downloading github.com/cockroachdb/apd v1.1.0
26.65 go: downloading github.com/gofrs/uuid v4.0.0+incompatible
26.67 go: downloading github.com/aws/aws-sdk-go-v2/config v1.27.13
26.67 go: downloading github.com/aws/aws-sdk-go-v2/service/kms v1.31.1
26.67 go: downloading cloud.google.com/go/kms v1.16.0
26.83 go: downloading github.com/googleapis/gax-go/v2 v2.12.4
26.89 go: downloading google.golang.org/api v0.180.0
26.91 go: downloading github.com/pmezard/go-difflib v1.0.0
26.92 go: downloading github.com/kr/pretty v0.3.1
26.93 go: downloading github.com/chzyer/test v1.0.0
27.08 go: downloading github.com/go-playground/validator/v10 v10.17.0
27.29 go: downloading github.com/aws/aws-sdk-go-v2 v1.26.1
27.32 go: downloading github.com/frankban/quicktest v1.14.6
27.32 go: downloading github.com/alecthomas/repr v0.4.0
27.32 go: downloading github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65
27.32 go: downloading github.com/lib/pq v1.10.9
27.32 go: downloading github.com/google/btree v1.1.2
27.32 go: downloading github.com/rogpeppe/go-internal v1.13.1
27.32 go: downloading github.com/kr/text v0.2.0
27.33 go: downloading github.com/hexops/gotextdiff v1.0.3
27.35 go: downloading github.com/chzyer/logex v1.2.1
27.36 go: downloading github.com/spaolacci/murmur3 v1.1.0
27.36 go: downloading github.com/OneOfOne/xxhash v1.2.8
27.36 go: downloading github.com/zeebo/pcg v1.0.1
27.37 go: downloading github.com/googleapis/gax-go v2.0.0+incompatible
27.37 go: downloading cloud.google.com/go v0.112.1
27.58 go: downloading github.com/leodido/go-urn v1.3.0
27.58 go: downloading github.com/go-playground/universal-translator v0.18.1
27.58 go: downloading github.com/gabriel-vasile/mimetype v1.4.3
27.62 go: downloading github.com/go-playground/locales v0.14.1
28.04 go: downloading github.com/aws/smithy-go v1.20.2
28.04 go: downloading github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5
28.31 go: downloading github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5
28.31 go: downloading github.com/aws/aws-sdk-go-v2/credentials v1.17.13
28.31 go: downloading github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1
28.31 go: downloading github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0
28.31 go: downloading github.com/aws/aws-sdk-go-v2/service/sso v1.20.6
28.31 go: downloading github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.0
28.31 go: downloading github.com/aws/aws-sdk-go-v2/service/sts v1.28.7
28.31 go: downloading cloud.google.com/go/iam v1.1.8
28.55 go: downloading cloud.google.com/go/longrunning v0.5.7
28.86 go: downloading google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda
28.99 go: downloading github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7
28.99 go: downloading github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2
31.21 go: downloading golang.org/x/oauth2 v0.22.0
31.21 go: downloading cloud.google.com/go/auth v0.4.1
31.21 go: downloading cloud.google.com/go/compute/metadata v0.5.0
31.21 go: downloading github.com/googleapis/enterprise-certificate-proxy v0.3.2
31.21 go: downloading cloud.google.com/go/auth/oauth2adapt v0.2.2
31.21 go: downloading github.com/google/s2a-go v0.1.7
31.21 go: downloading go.opencensus.io v0.24.0
31.21 go: downloading go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0
31.28 go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
31.39 go: downloading cloud.google.com/go/compute v1.23.3
31.72 2025/04/29 06:47:12 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /usr/bin/caddy -ldflags -w -s -trimpath -tags nobadger,nomysql,nopgx
43.76 # github.com/libdns/porkbun
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/client.go:59:40: r.Name undefined (type libdns.Record has no field or method Name)
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/client.go:65:77: r.Type undefined (type libdns.Record has no field or method Type)
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/client.go:87:13: record.TTL undefined (type libdns.Record has no field or method TTL)
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/client.go:88:11: record.TTL undefined (type libdns.Record has no field or method TTL)
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/client.go:90:30: record.TTL undefined (type libdns.Record has no field or method TTL)
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/client.go:91:46: record.Name undefined (type libdns.Record has no field or method Name)
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/client.go:97:53: record.Value undefined (type libdns.Record has no field or method Value)
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/client.go:97:108: record.Type undefined (type libdns.Record has no field or method Type)
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/client.go:102:86: record.ID undefined (type libdns.Record has no field or method ID)
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/models.go:48:9: invalid composite literal type libdns.Record
43.76 /go/pkg/mod/github.com/libdns/porkbun@v0.2.0/models.go:48:9: too many errors
49.80 2025/04/29 06:47:30 [INFO] Skipping cleanup as requested; leaving folder intact: /tmp/buildenv_2025-04-29-0646.2996367206
49.80 2025/04/29 06:47:30 [FATAL] exit status 1
------
Dockerfile:3
--------------------
   2 |
   3 | >>> RUN xcaddy build \
   4 | >>>     --with github.com/caddy-dns/porkbun \
   5 | >>>     --with github.com/hslatman/caddy-crowdsec-bouncer/http \
   6 | >>>     --with github.com/hslatman/caddy-crowdsec-bouncer/crowdsec \
   7 | >>>     --with github.com/hslatman/caddy-crowdsec-bouncer/layer4
   8 |
--------------------
ERROR: failed to solve: process "/bin/sh -c xcaddy build     --with github.com/caddy-dns/porkbun     --with github.com/hslatman/caddy-crowdsec-bouncer/http     --with github.com/hslatman/caddy-crowdsec-bouncer/crowdsec     --with github.com/hslatman/caddy-crowdsec-bouncer/layer4" did not complete successfully: exit code: 1

3. Caddy version:

v2.10.0

4. How I installed and ran Caddy:

a. System environment:

  • Debian GNU/Linux 12 (bookworm)
  • Docker version 27.1.1, build 6312585

b. Command:

docker build -t caddy-porkbun:v2.10.0 .

c. Service/unit/compose file:

FROM caddy:builder-alpine AS builder

RUN xcaddy build \
    --with github.com/caddy-dns/porkbun \
    --with github.com/hslatman/caddy-crowdsec-bouncer/http \
    --with github.com/hslatman/caddy-crowdsec-bouncer/crowdsec \
    --with github.com/hslatman/caddy-crowdsec-bouncer/layer4

FROM caddy:latest

COPY --from=builder /usr/bin/caddy /usr/bin/caddy

d. My complete Caddy config:

Don't believe it's relevant

I think this means the porkbun module needs to be updated for the new libdns API, which was mentioned in the 2.10.0 release notes. I can’t get the cloudns module to compile either, with similar errors.

There’s an issue in the github repository about it: Incompatible with Caddy v2.10.0 when building via xcaddy · Issue #24 · caddy-dns/porkbun · GitHub

2 Likes

Thank you, @hmoffatt ! I’ve subscribed to that Github issue and will wait for an update before attempting to update Caddy.

1 Like