Giter VIP home page Giter VIP logo

Comments (10)

Blokje5 avatar Blokje5 commented on May 28, 2024 1

I am working on this atm. Having some issues with the different dependencies on Docker (via the oras dependencies) and looking on a way to resolve it.

#11 123.9 go/pkg/mod/github.com/deislabs/[email protected]/pkg/oras/pull_opts.go:22:3: cannot use images.Dispatch (type func(context.Context, images.Handler, *semaphore.Weighted, ...v1.Descriptor) error) as type func(context.Context, images.Handler, ...v1.Descriptor) error in field value
#11 123.9 go/pkg/mod/github.com/deislabs/[email protected]/pkg/oras/push.go:46:69: cannot use opt.baseHandlers (type []images.Handler) as type func(images.Handler) images.Handler in argument to remotes.PushContent
#11 123.9 go/pkg/mod/github.com/deislabs/[email protected]/pkg/oras/push.go:46:69: invalid use of ... in call to remotes.PushContent
#11 127.8 # github.com/deislabs/oras/pkg/auth/docker
#11 127.8 go/pkg/mod/github.com/deislabs/[email protected]/pkg/auth/docker/login.go:26:3: unknown field 'V2Only' in struct literal of type "github.com/docker/docker/registry".ServiceOptions
------
executor failed running [/bin/sh -c GOOS=linux GOARCH=amd64 go build -o conftest -ldflags="-w -s" cmd/main.go]: exit code: 2
make: *** [conftest] Error 1

It seems like the dependency on ORAS still depends on the old docker/docker repo, while most of the code now resides in moby/moby. Any suggestion to resolve this would be appreciated. You can check out the current code here: https://github.com/Blokje5/conftest/pull/new/feat/docker-parser

from conftest.

jdolitsky avatar jdolitsky commented on May 28, 2024 1

PR opened for this oras-project/oras#116

Will report back when we have a release ready for you to use

from conftest.

garethr avatar garethr commented on May 28, 2024

conftest now has a parser interface (see #17) which should support this feature.

from conftest.

nicosto avatar nicosto commented on May 28, 2024

Thanks a lot, I'll take a look at this.

from conftest.

jpreese avatar jpreese commented on May 28, 2024

I want to put this here for visibility and.. because I'll inevietably forget everything I've found 🤙

So asottile has updated his package to use buildkit, which is great
https://github.com/asottile/dockerfile/blob/master/parse.go

That lone import gets us pretty much all the way there. We just need to reference that package, call parse, and we're off to the races.

The problem is that buildkit depends on containerd v1.3.0-psuedo
https://github.com/moby/buildkit/blob/master/go.mod#L12

and oras depends on v1.2.6
https://github.com/deislabs/oras/blob/master/go.mod#L12

While this shouldnt be a problem, containerd made a breaking change in v1.3.0 -- so when including buildkit into our project, it bumps up the containerd dependency which breaks oras.

Oras needs to include containerd v1.3.0, and then fix their library, because.. v1.3.0 breaks it. Or containerd needs to release a v2 (though they are not on modules)

from conftest.

Blokje5 avatar Blokje5 commented on May 28, 2024

@jpreese I have a working version using replace in go mod to utilise containerd v1.2.6. Indeed it would be ideal if this is resolved in containerd, but in the mean time we can use replace. You can check out the PR if you want.

from conftest.

jpreese avatar jpreese commented on May 28, 2024

Let's see what happens with the issue on the containerd repository. I'd rather not duplicate the parser.go file from asottile's repository if we don't have to.

from conftest.

garethr avatar garethr commented on May 28, 2024

@jdolitsky may be able to help with pointers on the Oras front as well.

from conftest.

jdolitsky avatar jdolitsky commented on May 28, 2024

oh my... these dependency issues again.

I've just opened oras-project/oras#111 to update containerd dependency

from conftest.

jdolitsky avatar jdolitsky commented on May 28, 2024

@jpreese @Blokje5 @garethr ORAS v0.7.0 has been released updating these dependencies. Please let me know if this solves the issue

https://github.com/deislabs/oras/releases/tag/v0.7.0

from conftest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.