-
Notifications
You must be signed in to change notification settings - Fork 618
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
Add builder OCI layout build context #3327
Add builder OCI layout build context #3327
Conversation
) | ||
|
||
func TestBuildContextWithOCILayout(t *testing.T) { | ||
testutil.DockerIncompatible(t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment to explain this
e29ea5c
to
36beb7c
Compare
) | ||
|
||
func TestBuildContextWithOCILayout(t *testing.T) { | ||
// Docker driver does not support OCI exporter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker buildx build
supports it though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AkihiroSuda, that helped me figure out my issue. I needed to setup a docker-container builder in order to be able to build the OCI tarball.
ade08c6
to
f2e337a
Compare
Looks like my test needs a little more bake time. Looking into it now. |
f2e337a
to
a11a63c
Compare
Got it. Just forgot to tag the image before running. Test now passes on nerdctl and Docker. |
a11a63c
to
669e810
Compare
@austinvazquez left a few comments / nits, but otherwise looks fine. |
Thanks @apostasie, taking a look now. :) |
bedfd3f
to
03fbad3
Compare
go.mod
Outdated
@@ -34,6 +34,7 @@ require ( | |||
github.com/coreos/go-iptables v0.7.0 | |||
github.com/coreos/go-systemd/v22 v22.5.0 | |||
github.com/cyphar/filepath-securejoin v0.3.1 | |||
github.com/distribution/distribution v2.8.3+incompatible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dependency should not be needed
pkg/cmd/builder/build.go
Outdated
|
||
var digest string | ||
for _, manifest := range ociIndex.Manifests { | ||
if manifest.MediaType == schema2.MediaTypeManifest || manifest.MediaType == ocispec.MediaTypeImageManifest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AkihiroSuda, pushed the change to use containerd images pkg. Even found a helper function to call in place of the logic I pushed before.
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
03fbad3
to
1201665
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Description
This change adds building images with OCI layout build contexts.
Testing
Additional references