Building current Caddy v2.2.1 with Gandi plugin in Docker is broken due to checksum error

1. Caddy version (caddy version):

v2.2.1

2. How I run Caddy:

In official Docker image

a. System environment:

Ubuntu 18.04 as host, Docker container

b. Command:

docker build

c. Service/unit/compose file:

FROM caddy:2.2.1-builder AS builder

RUN xcaddy build v2.2.1 \
    --with github.com/caddy-dns/gandi

FROM caddy:2.2.1

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

d. My complete Caddyfile or JSON config:

Fails before reaching this point

3. The problem I’m having:

When building the Docker image with the Gandi plugin the build process aborts and I get a checksum error when compiling the Gandi plugin.

4. Error messages and/or full log output:

Building web
Step 1/4 : FROM caddy:2.2.1-builder AS builder
 ---> 7fdc765c6443
Step 2/4 : RUN xcaddy build v2.2.1     --with github.com/caddy-dns/gandi
 ---> Running in ab3fbf199fe9
2020/11/17 15:40:09 [INFO] Temporary folder: /tmp/buildenv_2020-11-17-1540.327276530
2020/11/17 15:40:09 [INFO] Writing main module: /tmp/buildenv_2020-11-17-1540.327276530/main.go
2020/11/17 15:40:09 [INFO] Initializing Go module
2020/11/17 15:40:09 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init caddy 
go: creating new go.mod: module caddy
2020/11/17 15:40:09 [INFO] Pinning versions
2020/11/17 15:40:09 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddyserver/caddy/v2@v2.2.1 
go: downloading github.com/caddyserver/caddy/v2 v2.2.1
go: downloading golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
go: downloading github.com/caddyserver/certmagic v0.12.0
go: downloading go.uber.org/zap v1.15.0
go: downloading github.com/prometheus/client_golang v1.7.1
go: downloading go.uber.org/multierr v1.5.0
go: downloading go.uber.org/atomic v1.6.0
go: downloading github.com/golang/protobuf v1.4.2
go: downloading github.com/prometheus/procfs v0.1.3
go: downloading github.com/prometheus/common v0.10.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/klauspost/cpuid v1.2.5
go: downloading github.com/mholt/acmez v0.1.1
go: downloading github.com/miekg/dns v1.1.30
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading google.golang.org/protobuf v1.24.0
go: downloading golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading golang.org/x/net v0.0.0-20200707034311-ab3426394381
go: downloading github.com/libdns/libdns v0.1.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading golang.org/x/text v0.3.2
2020/11/17 15:40:13 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddy-dns/gandi 
go: downloading github.com/caddy-dns/gandi v1.0.1
go get github.com/caddy-dns/gandi: github.com/caddy-dns/gandi@v1.0.1: verifying module: checksum mismatch
	downloaded: h1:oF64bX3y8St1KDvqDNHHKlsKSPfCcsjjlrAOY/6ochU=
	sum.golang.org: h1:LtTcFXwVqasaOQbJCd2WIQehTw0WPA8DrgKdievSMgU=

SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.
2020/11/17 15:40:15 [FATAL] exit status 1

5. What I already tried:

Googled for similar error, could not find a helping resource.

6. Links to relevant resources:

https://github.com/caddy-dns/gandi/issues/1

You’re building with github.com/libdns/gandi, but you need to build with github.com/caddy-dns/gandi to get the actual Caddy plugin.

Thanks @francislavoie, that was an edit I just made before posting this error report…

In the log file you can see I’m using caddy-dns/gandi plugin.

1 Like

Okay – ultimately I think opening that github issue was the right thing to do here :+1:

https://github.com/caddy-dns/gandi/issues/1

1 Like

Thank you very much for your help.

Hopefully one of the maintainers gets the chance to have a look at it.

The maintainer of this plugin resubmitted the plugin with a new checksum. I will try tomorrow morning if this will resolve my problems.

1 Like

Resubmitting the plugin by the maintainer solved my problem. Also see the Github issue for more information.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.