grafana / certmagic-gcs

GCS storage for Certmagic
GNU Affero General Public License v3.0
10 stars 5 forks source link

Build fail with Caddy 2.6.4 #138

Closed lpellegr closed 1 year ago

lpellegr commented 1 year ago

Running docker build -t caddy:latest . with the following Dockerfile:

FROM caddy:2.6.4-builder AS builder

RUN xcaddy build \
    --with github.com/grafana/certmagic-gcs

FROM caddy:2.6.4

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

fails with this error:

#0 42.31 # github.com/caddyserver/caddy/v2/modules/caddytls
#0 42.31 /go/pkg/mod/github.com/caddyserver/caddy/v2@v2.6.4/modules/caddytls/automation.go:266:3: unknown field 'Managers' in struct literal of type certmagic.Config
#0 42.47 2023/06/19 22:02:50 [INFO] Skipping cleanup as requested; leaving folder intact: /tmp/buildenv_2023-06-19-2202.1119114035
#0 42.47 2023/06/19 22:02:50 [FATAL] exit status 2
------
Dockerfile:3
--------------------
   2 |     
   3 | >>> RUN xcaddy build \
   4 | >>>     --with github.com/grafana/certmagic-gcs
   5 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c xcaddy build     --with github.com/grafana/certmagic-gcs" did not complete successfully: exit code: 1
lpellegr commented 1 year ago

Note the following is building without errors:

FROM caddy:2.6.2-builder AS builder

RUN xcaddy build \
    --with github.com/grafana/certmagic-gcs@21701602f53b3d609d98a3649dec7debacf1b89d

FROM caddy:2.6.2

COPY --from=builder /usr/bin/caddy /usr/bin/caddy
hairyhenderson commented 1 year ago

@lpellegr this is likely due to certmagic being upgraded. Unfortunately we don't (yet) tag releases for this module, but you should either be able to build from caddy:2.7.0-beta.1 or with the 3eb0776abdcd587fdc325811fe2006ae9d85c6f6 commit of this module.

hairyhenderson commented 1 year ago

2.7.2 is out now - best to just build with that