Add EROFS layer media type#12567
Conversation
1c1810e to
7e0271c
Compare
7e0271c to
67d1783
Compare
|
ping @dmcgowan |
fuweid
left a comment
There was a problem hiding this comment.
I would like to wait for other maintainers to chime in
| MediaTypeImageLayerGzipEncrypted = ocispec.MediaTypeImageLayerGzip + "+encrypted" | ||
|
|
||
| // EROFS media type. | ||
| // The ".erofs" suffix is kept for compatibility with containerd 2.1, |
There was a problem hiding this comment.
we can update that erofs doc in that follow up.
|
@ChengyuZhu6 , can you simply change the exact mediatype into Anyway, it's a prerequisite for #12506 |
67d1783 to
8c59905
Compare
Done. |
| // EROFS media type. | ||
| // The ".erofs" suffix is kept for compatibility with containerd 2.1, | ||
| // which detect native EROFS layers by checking whether the media type ends with ".erofs". | ||
| MediaTypeErofsLayer = "vnd.erofs.layer.overlayfs.v1.erofs" |
There was a problem hiding this comment.
Can you help me understand the reasoning behind two choices here?
- is there a reason this mediaType string starts at
vndinstead ofapplication/vndlike the others? - what's the purpose of including
overlayfsas part of the subtype? I've seen strings that uselayer.v1but didn't find any precedent forlayer.{something}.v1(other thannondistributable). My guess is it's to signal that erofs is an overlay filesystem, but it's not clear to me why its important to include that in the media type.
There was a problem hiding this comment.
whoops, missed the discussion + this comment. so then my only Q is the first one about application/vnd
There was a problem hiding this comment.
hmm one more nit / thought-- might be overly verbose, but could be nice to link to the vnd.erofs media type definition inline here for reference
|
This looks great; having this erofs layer media type defined seems like it'll be useful esp as adoption increases. Happy to rebase #12506 on top of this when it's ready to land |
a4a5d90 to
90d97cd
Compare
abc1009 to
f8f0b00
Compare
08c529d to
e1cde6c
Compare
|
@containerd/committers As for this PR, could you give some more comments or reviews? |
e1cde6c to
965fea8
Compare
Signed-off-by: ChengyuZhu6 <[email protected]>
965fea8 to
36f8999
Compare
images: add EROFS layer media type
|
Thanks Derek(@dmcgowan), Wei(@fuweid), Brian(@cpuguy83), Annie (@anniecherk), Aadhar (@aadhar-agarwal) and Chengyu (@ChengyuZhu6) , happy new year to all again! 🎉 |
It introduces "application/vnd.erofs.layer.v1" to add support for EROFS native layers, so that containerd can fetch EROFS native container images directly.
E.g.
ctr run --snapshotter erofs -t quay.io/chengyuzhu6/ubuntu:20.04-erofs test /bin/bash