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

Allow overriding the ManifestDescriptor when pushing #133

Merged

Conversation

ecordell
Copy link
Contributor

@ecordell ecordell commented Oct 11, 2019

What this does
This PR adds a new field to PushOpt, and corresponding config functions, to allow giving an entire manifest descriptor to ORAS when pushing.

Why

I've been experimenting with building small, static images using ORAS, while still making them appear as standard docker v2-2 images rather than OCI.

I found that I could do almost everything I needed to aside from overriding the ManifestDescriptor - which I needed to do to set the MediaType on the manifest (image-spec omits this field, but docker registry complains about it).

See where I'm using this here: https://github.com/ecordell/bndlr/blob/master/pkg/bundle/bundle.go#L58-L79

Also open to feedback and suggestions if there are better approaches to what I'm doing. Thanks!

@msftclas
Copy link

msftclas commented Oct 11, 2019

CLA assistant check
All CLA requirements met.

pkg/oras/push.go Outdated Show resolved Hide resolved
pkg/oras/push_opts.go Outdated Show resolved Hide resolved
@ecordell ecordell force-pushed the manifestdescriptor-override branch from 2566435 to a41d6a9 Compare October 12, 2019 19:41
@jzelinskie jzelinskie merged commit 205efe3 into oras-project:master Oct 14, 2019
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

Successfully merging this pull request may close these issues.

3 participants