estesp / manifest-tool

Command line tool to create and query container image manifest list/indexes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make binary is broken on master

andig opened this issue · comments

commented

I would like to use manifest-tool to investigate error messages I'm getting with docker hub (https://stackoverflow.com/questions/60632911/what-is-the-manifest-blob-unknown-blob-unknown-to-registry-error, any OT comment would be welcome).

I'm failing to compile it though (go version go1.14.3 darwin/amd64):

❯ make binary 
go build -ldflags "-X main.gitCommit="fa20a3b9b43f7c1acedb8d97c249803cc923e009"" -o manifest-tool github.com/estesp/manifest-tool
go: finding module for package github.com/estesp/manifest-tool
go: downloading github.com/estesp/manifest-tool v1.0.2
go: found github.com/estesp/manifest-tool in github.com/estesp/manifest-tool v1.0.2
go: finding module for package github.com/codegangsta/cli
go: finding module for package github.com/go-yaml/yaml
go: finding module for package github.com/docker/cli/cli/config
go: finding module for package github.com/vbatts/tar-split/tar/asm
go: downloading github.com/codegangsta/cli v1.22.4
go: downloading github.com/containerd/continuity v0.0.0-20181203112020-004b46473808
go: downloading github.com/go-yaml/yaml v2.1.0+incompatible
go: downloading github.com/docker/cli v17.12.1-ce-rc2+incompatible
go: downloading github.com/vbatts/tar-split v0.11.1
go: finding module for package github.com/vbatts/tar-split/tar/storage
go: finding module for package github.com/docker/libtrust
go: finding module for package github.com/docker/go-metrics
go: finding module for package github.com/opencontainers/runtime-spec/specs-go
go: finding module for package github.com/mattn/go-shellwords
go: downloading github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7
go: downloading github.com/docker/go-metrics v0.0.1
go: downloading github.com/opencontainers/runtime-spec v1.0.2
go: found github.com/codegangsta/cli in github.com/codegangsta/cli v1.22.4
go: found github.com/go-yaml/yaml in github.com/go-yaml/yaml v2.1.0+incompatible
go: found github.com/docker/libtrust in github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7
go: found github.com/vbatts/tar-split/tar/asm in github.com/vbatts/tar-split v0.11.1
go: found github.com/mattn/go-shellwords in github.com/mattn/go-shellwords v1.0.10
go: found github.com/docker/go-metrics in github.com/docker/go-metrics v0.0.1
go: found github.com/opencontainers/runtime-spec/specs-go in github.com/opencontainers/runtime-spec v1.0.2
go: github.com/estesp/manifest-tool imports
        github.com/codegangsta/cli: github.com/codegangsta/cli@v1.22.4: parsing go.mod:
        module declares its path as: github.com/urfave/cli
                but was required as: github.com/codegangsta/cli
make: *** [binary] Error 1

In my experience this is typically caused by using module replacements directly instead of using the replace directive in go mod.

I haven't done the required work to support Go modules on master, but I have done so on my "v2-rework" branch which is extremely close to feature parity with the master branch.

For now, if you want to build master with a recent Golang toolchain, you should be able to ignore Go modules and use the traditional vendor/ support that master is utilizing by setting GO111MODULE=off in the environment where you call make binary.

I would be interested if you tried out the v2-rework branch as it may be more amenable to debugging registry interactions. If you turn on log level debug you actually see the HTTP traffic information (e.g. all headers and response data) with the registry due to the fact I'm using the containerd library as the "registry client".