Comments (10)
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.
PR opened for this oras-project/oras#116
Will report back when we have a release ready for you to use
from conftest.
conftest now has a parser interface (see #17) which should support this feature.
from conftest.
Thanks a lot, I'll take a look at this.
from conftest.
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.
@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.
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.
@jdolitsky may be able to help with pointers on the Oras front as well.
from conftest.
oh my... these dependency issues again.
I've just opened oras-project/oras#111 to update containerd dependency
from conftest.
@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)
- Conftest does not support returning details of a PASS conftest output HOT 5
- Add support for "azuredevops" output
- Rego policy with ExternalData Provider : undefined function external_data HOT 2
- Add support for adding built-in functions HOT 2
- Investigate generics usage in parser and engine packages HOT 2
- conftest read json file failed due to json file contains BOM HOT 3
- Rules returning a boolean (no msg) HOT 2
- parse_config not working for dockerfile HOT 2
- OPA doesn't consider built-in error fatal, but Conftest does. Can we revert the change? HOT 1
- Conftest does not output detailed summary report HOT 1
- Dependabot should update all parsers
- Implement option for custom output destinations in `output.Get()`
- Sarif Format Support HOT 2
- Has anyone used conftest in s390x environment? HOT 3
- Parser for nginx HOT 2
- Error in documentation for pulling OCI registry
- Using Conftest with OPA bundles
- Invalid parsing of ResourceQuota yaml file HOT 1
- Improper if Usage seems to miss a valid case HOT 1
- Jsonnet parser cannot handle relative imports HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conftest.