caddy-dns / acmedns

MIT License
37 stars 4 forks source link

Error: Can't find reason for requirement on github.com/google/pprof@v0.0.0-20210407192527-94a9f03dee #5

Closed rfdrake closed 1 year ago

rfdrake commented 1 year ago

I'm seeing this error while trying to build the acmedns caddy using xcaddy.

I'm wondering if this module was left in the list during some debugging? Or else maybe I'm running the wrong version of something.

My Dockerfile is pretty simple:

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
mholt commented 1 year ago

This is due to a bug in the Go tool.

You can work around it in the meantime by specifying @master after the module path (in the case for this module).

gucki commented 1 year ago

@mholt Just tried your solution but it doesn't seem to work:

FROM caddy:2.6.4-builder-alpine AS builder
RUN xcaddy build --with github.com/caddy-dns/acmedns@master

FROM caddy:2.6.4
COPY --from=builder /usr/bin/caddy /usr/bin/caddy

Fails with:

#0 19.05 go: added google.golang.org/protobuf v1.28.1
#0 19.05 2023/06/27 14:07:04 [INFO] exec (timeout=-2562047h47m16.854775808s): /usr/local/go/bin/go get -d -v github.com/caddy-dns/acmedns@master github.com/caddyserver/caddy/v2@v2.6.4 
#0 22.82 go: github.com/caddy-dns/acmedns@master: invalid version: unknown revision master
#0 22.83 2023/06/27 14:07:07 [FATAL] exit status 1
------
failed to solve: executor failed running [/bin/sh -c xcaddy build --with github.com/caddy-dns/acmedns@master]: exit code: 1
gucki commented 1 year ago

@mholt Ok, the "master" branch is called "main" in this repo. So using @main instead of @master works…