-
Notifications
You must be signed in to change notification settings - Fork 694
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 support for erofs and squashfs layer media types #1191
base: main
Are you sure you want to change the base?
Conversation
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 needs a rebase on main to be considered. Also, I don't think we need to include non-OCI media types, especially if they've been registered with IANA.
OCI artifacts support has landed in various OCI specs v1.1.0 which allows for arbitrary artifact types, small and large. Large artifacts (even existing container images) pose a particular challenge that: 1. it takes too long to download 2. it takes too long to unpack This PR **begins** to address 2. above. squashfs (an older read-only) and erofs (newer) filesystems are already compressed full filesystems, and overlayfs compatible. The downsides are this change becomes very Linux-specific? Signed-off-by: Ramkumar Chinchani <[email protected]>
opencontainers/distribution-spec#537 |
This PR just represents possibilities. Needs a discussion if OCI wants to "adopt" this a recommended option. Almost all known solutions end up being a clever fuse or remotefs wrapper around a layer - so why not make the layer a filesystem itself! No further machinery needed. |
JFYI, EROFS already has a IANA-registered media type "vnd.erofs" if some format is referred. |
Could also be Open question, whiteout handling |
The problems I see with large binary files (eg AI models) is that they don't tend well to compression. I would like to see if we can improve the distribution spec to allow parallel chunked upload/download. Right now we can only upload/download sequentially |
I get the impression that most registries allow this already and we're just formalizing it. |
https://stackerbuild.io/ |
In this context ^ |
Honestly not in favor or non-oci types here. |
Just to clarify further - the image is still OCI; this is about the layers. If they are complete filesystems (squashfs, erofs), then they can just be mounted directly. This is an alternative approach to what the recently added containerd erofs snapshotter does today - convert tgz into erofs and cache. The only implication wrt this PR is that if squashfs, erofs are made "official" layer types (not a MUST btw, image still OCI), then the negotiation with containerd community becomes easier. Else maybe they will accept a tunable/config to allow such types. If squashfs,erofs+verity are produced and signed at source, then integrity is maintained end-to-end and becomes a much simpler deployment model - no tgz mutation gimmickry. |
@rchincha One thing I might need to mention here is |
...
Also I try to enable EROFS metadata compression in the kernel 6.16 cycle: Compressed metadata is just placed in a special on-disk inode, so the metadata compress algorithm can be different from data algorithms, which could be useful to maximize runtime performance for metadata (lz4, zstd, or uncompressed) and leave high compression ratios for data (zstd, lzma, deflate, etc.) |
Pushed two test multi-layer OCI images with erofs layers (with and without dm-verity) https://hub.docker.com/repository/docker/ramchi879/test-erofs-verity/tags To download them, |
OCI artifacts support has landed in various OCI specs v1.1.0 which allows for arbitrary artifact types, small and large.
Large artifacts (even existing container images) pose a particular challenge that:
This PR begins to address 2. above.
squashfs (an older read-only) and erofs (newer) filesystems are already compressed full filesystems, and overlayfs compatible.