Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install using instructions #241

Open
anoronh4 opened this issue Mar 22, 2024 · 3 comments
Open

Unable to install using instructions #241

anoronh4 opened this issue Mar 22, 2024 · 3 comments

Comments

@anoronh4
Copy link

I am attempting to install image-tools on my MacOS, and I am not super familiar with go, to be honest. My goal is to validate images before pushing to a registry.

following your instructions, i am able to get the following working

$ go get -d github.com/opencontainers/image-tools/cmd/oci-image-tool

but the cd command doesn't work because it seems to go to a different path. here's the Makefiles i found in my GOPATH:

./pkg/mod/github.com/cpuguy83/go-md2man/[email protected]/Makefile
./pkg/mod/github.com/opencontainers/[email protected]/Makefile
./pkg/mod/github.com/opencontainers/[email protected]/Makefile
./pkg/mod/github.com/opencontainers/[email protected]/schema/Makefile
./pkg/mod/github.com/opencontainers/[email protected]/Makefile
./pkg/mod/github.com/pkg/[email protected]/Makefile

so i changed directory to the image-tools one. but when I run make all i have the following error:

$ make all
go build -ldflags "-X main.gitCommit=" -o oci-image-tool ./cmd/oci-image-tool
cmd/oci-image-tool/main.go:21:2: cannot find package "github.com/Sirupsen/logrus" in any of:
	/usr/local/Cellar/go/1.22.1/libexec/src/github.com/Sirupsen/logrus (from $GOROOT)
	/Users/noronhaa/Documents/rungo/src/github.com/Sirupsen/logrus (from $GOPATH)
cmd/oci-image-tool/validate.go:23:2: cannot find package "github.com/opencontainers/image-spec/schema" in any of:
	/usr/local/Cellar/go/1.22.1/libexec/src/github.com/opencontainers/image-spec/schema (from $GOROOT)
	/Users/noronhaa/Documents/rungo/src/github.com/opencontainers/image-spec/schema (from $GOPATH)
cmd/oci-image-tool/create.go:21:2: cannot find package "github.com/opencontainers/image-tools/image" in any of:
	/usr/local/Cellar/go/1.22.1/libexec/src/github.com/opencontainers/image-tools/image (from $GOROOT)
	/Users/noronhaa/Documents/rungo/src/github.com/opencontainers/image-tools/image (from $GOPATH)
cmd/oci-image-tool/main.go:22:2: cannot find package "github.com/opencontainers/image-tools/version" in any of:
	/usr/local/Cellar/go/1.22.1/libexec/src/github.com/opencontainers/image-tools/version (from $GOROOT)
	/Users/noronhaa/Documents/rungo/src/github.com/opencontainers/image-tools/version (from $GOPATH)
cmd/oci-image-tool/validate.go:25:2: cannot find package "github.com/pkg/errors" in any of:
	/usr/local/Cellar/go/1.22.1/libexec/src/github.com/pkg/errors (from $GOROOT)
	/Users/noronhaa/Documents/rungo/src/github.com/pkg/errors (from $GOPATH)
cmd/oci-image-tool/create.go:22:2: cannot find package "github.com/urfave/cli" in any of:
	/usr/local/Cellar/go/1.22.1/libexec/src/github.com/urfave/cli (from $GOROOT)
	/Users/noronhaa/Documents/rungo/src/github.com/urfave/cli (from $GOPATH)
make: *** [tool] Error 1

I still get the logrus error even after installing that package. Seems like go or the Makefile wants to find files and installations at very specific locations but my paths are all messed up. Can you provide guidance on this?

@coolljt0725
Copy link
Member

This project is not actively maintainerd, you can try alternative project: https://github.com/opencontainers/umoci

@anoronh4
Copy link
Author

anoronh4 commented Apr 3, 2024

it doesn't seem like umoci can perform validation according to this issue: opencontainers/umoci#361

@cyphar
Copy link
Member

cyphar commented Apr 4, 2024

Indeed, I haven't yet sat down to do that (it will require a fairly significant rework because a missing feature of image-tools is to allow you to validate multiple versions of the spec -- the inability to do this makes it hard to update both upstream and downstream). image-tools also cannot validate modern images, which is making it difficult to update umoci to use a newer version of the spec...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants