Conversation
- Support for pulling oci:// URL into local store - Support for pushing from local store to registry - Downloads blobs only when not found in local store - Currently only supports OCI v1 manifest media type - Does not support docker:// URLs or Docker manifests - Does not yet support chunked blob uploading Signed-off-by: Josh Dolitsky <josh@dolit.ski>
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
| fmt.Sprintf("Content-Type header for image manifest invalid: %s", mediaType)) | ||
| } | ||
|
|
||
| d, s, err := engine.PutBlob(engineContext, bytes.NewReader(resp.Body())) |
There was a problem hiding this comment.
As far as I can tell, resp.Body() here is: https://pkg.go.dev/github.com/go-resty/resty/v2#Response.Body which will end up reading the whole layer into memory. Seems like you want RawBody() here?
https://pkg.go.dev/github.com/go-resty/resty/v2#Response.RawBody
There was a problem hiding this comment.
Oh, derp. I meant to put this on the layer one below. For this one I think it's unavoidable: you definitely want to read the manifest bytes into memory.
|
One small nit on this, but otherwise it looks like it might be useful to us. How close do you feel this is to merging? |
I've been chatting to @jdolitsky about this for a little bit -- my current plan is for me to rework this PR so that it's implemented as a |
Excellent, thanks! |
|
What's the status of this? I'd like to get some features into containers/image soon-ish, but it would be better to have them here, if possible :) |
|
I haven't touched this in a while. I can try to revive my PoC using the CAS API -- what exactly did you want to get into containers/image? Switching to |
|
Mostly I don't want it to compress things automatically that aren't gzip :) |
|
I feel the the only slight complication is going to be chunked uploads and downloads which this PoC didn't implement. I started working on a PoC of this, it shouldn't be that bad on paper but implementing a generic |
|
@cyphar - shall I close this for now? |
Resolves #345
Demo
Get binaries for zot and umoci (modified), add to PATH
Start zot server (port 8080)
Use skopeo to fetch Docker manifest, convert to OCI, and push to zot
umoci copy: remote to local
output:
inspect CAS:
umoci copy: local to remote
output:
If you add the
--trace-requestsflag, raw HTTP output will be displayed:output: