-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support creating and pushing OCI types #467
Conversation
client/client_test.go
Outdated
@@ -612,11 +611,15 @@ func testBuildPushAndValidate(t *testing.T, sb integration.Sandbox) { | |||
dt, err = content.ReadBlob(ctx, img.ContentStore(), img.Target()) | |||
require.NoError(t, err) | |||
|
|||
var mfst schema2.Manifest | |||
var msft = struct { |
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.
mfst?
da6afec
to
0b3d80d
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.
Can we have the exporter opt called oci-mediatypes=true|false
so it isn't confusing with the oci/docker
exporter names. And also expose the opt to the oci/docker
exporter because currently it still makes sense to use the oci layout but without the types(for example when working with containerd). The default can be based on the exporter name.
fyi @northtyphoon (#424)
exporter/containerimage/writer.go
Outdated
@@ -41,7 +41,7 @@ type ImageWriter struct { | |||
opt WriterOpt | |||
} | |||
|
|||
func (ic *ImageWriter) Commit(ctx context.Context, ref cache.ImmutableRef, config []byte) (*ocispec.Descriptor, error) { | |||
func (ic *ImageWriter) Commit(ctx context.Context, ref cache.ImmutableRef, config []byte, OCI bool) (*ocispec.Descriptor, error) { |
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.
nit: don't capitalize oci here
0b3d80d
to
8e5cc5f
Compare
Can we use https://github.com/containerd/containerd/blob/master/images/oci/exporter.go for pure OCI ? |
8e5cc5f
to
9c89633
Compare
Adds image and oci exporter option "oci-mediatypes" Ensures that the images created in the content store have the correct type which matches the manifest. Sets the correct media type on the descriptor in push from reading the type specified in the manifest. Removes use of distribution manifest packages. Signed-off-by: Derek McGowan <[email protected]>
9c89633
to
618f34a
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.
LGTM
Add docs for Dockerfile ADD/COPY --chown flag
Adds image exporter option "oci".
Ensures that the images created in the content store have the correct type which matches the manifest.
Sets the correct media type on the descriptor in push from reading the type specified in the manifest.
Removes use of distribution manifest packages.
Needed for testing distribution/distribution#2076
A registry with that PR can be used with this change to push OCI manifests
Using