image: align erofs raw/zstd convert behavior with containerd#4927
Open
ChengyuZhu6 wants to merge 1 commit into
Open
image: align erofs raw/zstd convert behavior with containerd#4927ChengyuZhu6 wants to merge 1 commit into
ChengyuZhu6 wants to merge 1 commit into
Conversation
sathiraumesh
suggested changes
May 22, 2026
45e749b to
d5a41d0
Compare
sathiraumesh
suggested changes
May 22, 2026
d597639 to
1e2babc
Compare
Contributor
|
if there are no others it looks okay to me |
8d9de47 to
b85a0ea
Compare
Add raw and zstd EROFS conversion support with containerd's EROFS converter. Fixes: containerd#4861 Signed-off-by: Chengyu Zhu <hudson@cyzhu.com>
Member
Author
# nerdctl image convert --erofs zstd env12.com/library/ubuntu:20.04 env12.com/library/ubuntu:20.04-erofs-0621-zstd
WARN[0000] option --erofs should be used in conjunction with --oci
env12.com/library/ubuntu:20.04-erofs-0621-zstd: resolved env12.com/library/ubuntu:20.04-erofs-0621-zstd: resolved |++++++++++++++++++++++++++++++++++++++| index-sha256:121726370cec48ffa4fc006c3f75d5cd0835b6b97586119023a7068e7906d0b7: exists |++++++++++++++++++++++++++++++++++++++| manifest-sha256:c664f8f86ed5a386b0a340d981b8f81714e21a8b9c73f658c4bea56aa179d54a: exists |++++++++++++++++++++++++++++++++++++++| config-sha256:b7bab04fd9aa0c771e5720bf0cc7cbf993fd6946645983d9096126e5af45d713: exists |++++++++++++++++++++++++++++++++++++++| layer-sha256:13b7e930469f6d3575a320709035c6acf6f5485a76abcf03d1b92a64c09c2476: exists |++++++++++++++++++++++++++++++++++++++| elapsed: 2.9 s total: 0.0 B (0.0 B/s)
# nerdctl push env12.com/library/ubuntu:20.04-erofs-0621-zstdINFO[0000] pushing as a reduced-platform image (application/vnd.oci.image.index.v1+json, sha256:6d253ab5bee747c31e242be763d43a8fae579f66d45ef4fe9e981059bdbd0e0a)
index-sha256:6d253ab5bee747c31e242be763d43a8fae579f66d45ef4fe9e981059bdbd0e0a: done |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:bbff53e6a6c1e7fa4f9a937721d80a530f7fab85e2c1b9c013b1de1432bf4ea7: done |++++++++++++++++++++++++++++++++++++++|
layer-sha256:be3e928c0084a1279b86d771cd8c9d75a9d7e90295131c3757388c6bac9c4084: done |++++++++++++++++++++++++++++++++++++++|
config-sha256:5824adab6cbce42ae826a50d419493c49447f9c827d83e24eec2138c3b620c7f: done |++++++++++++++++++++++++++++++++++++++|
elapsed: 4.3 s total: 23.2 M (5.4 MiB/s)
# nerdctl image convert --erofs raw env12.com/library/ubuntu:20.04 env12.com/library/ubuntu:20.04-erofs-0621
WARN[0000] option --erofs should be used in conjunction with --oci
env12.com/library/ubuntu:20.04-erofs-0621: resolved env12.com/library/ubuntu:20.04-erofs-0621: resolved |++++++++++++++++++++++++++++++++++++++| index-sha256:121726370cec48ffa4fc006c3f75d5cd0835b6b97586119023a7068e7906d0b7: exists |++++++++++++++++++++++++++++++++++++++| manifest-sha256:c664f8f86ed5a386b0a340d981b8f81714e21a8b9c73f658c4bea56aa179d54a: exists |++++++++++++++++++++++++++++++++++++++| config-sha256:b7bab04fd9aa0c771e5720bf0cc7cbf993fd6946645983d9096126e5af45d713: exists |++++++++++++++++++++++++++++++++++++++| layer-sha256:13b7e930469f6d3575a320709035c6acf6f5485a76abcf03d1b92a64c09c2476: exists |++++++++++++++++++++++++++++++++++++++| elapsed: 3.2 s total: 0.0 B (0.0 B/s)
# nerdctl push env12.com/library/ubuntu:20.04-erofs-0621INFO[0000] pushing as a reduced-platform image (application/vnd.oci.image.index.v1+json, sha256:46e3aed7bc082f2386106b7b3ac50089457840ab8717277941cfe94e32f96bdd)
index-sha256:46e3aed7bc082f2386106b7b3ac50089457840ab8717277941cfe94e32f96bdd: done |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:7cfe388d681e8e39f44b025387f53fafc6bef12a95fda9561755d915347276ba: done |++++++++++++++++++++++++++++++++++++++|
layer-sha256:34c9cce61ef84e29d092a45e64069667c7e3542e8481d4fe8725bb774bcd6167: done |++++++++++++++++++++++++++++++++++++++|
config-sha256:62184158ea39ddb98ae7df5c55ad73df8a0a9f6110f594db0bbe01b1224ee560: done |++++++++++++++++++++++++++++++++++++++|
elapsed: 8.0 s total: 75.9 M (9.5 MiB/s) |
Member
Author
# nerdctl manifest inspect env12.com/library/ubuntu:20.04-erofs-0621-zstd
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:bbff53e6a6c1e7fa4f9a937721d80a530f7fab85e2c1b9c013b1de1432bf4ea7",
"size": 399,
"annotations": {
"com.docker.official-images.bashbrew.arch": "amd64",
"org.opencontainers.image.base.name": "scratch",
"org.opencontainers.image.created": "2025-04-04T00:00:00Z",
"org.opencontainers.image.revision": "fb4da0956290c3b216a35315510f66ca9bc4a460",
"org.opencontainers.image.source": "https://git.launchpad.net/cloud-images/+oci/ubuntu-base",
"org.opencontainers.image.url": "https://hub.docker.com/_/ubuntu",
"org.opencontainers.image.version": "20.04"
},
"platform": {
"architecture": "amd64",
"os": "linux",
"os.features": [
"erofs"
]
}
}
]
}
# nerdctl manifest inspect env12.com/library/ubuntu@sha256:bbff53e6a6c1e7fa4f9a937721d80a530f7fab85e2c1b9c013b1de1432bf4ea7
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:5824adab6cbce42ae826a50d419493c49447f9c827d83e24eec2138c3b620c7f",
"size": 2029
},
"layers": [
{
"mediaType": "application/vnd.erofs.layer.v1+zstd",
"digest": "sha256:be3e928c0084a1279b86d771cd8c9d75a9d7e90295131c3757388c6bac9c4084",
"size": 24365791
}
]
}
# nerdctl manifest inspect env12.com/library/ubuntu:20.04-erofs-0621
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:7cfe388d681e8e39f44b025387f53fafc6bef12a95fda9561755d915347276ba",
"size": 394,
"annotations": {
"com.docker.official-images.bashbrew.arch": "amd64",
"org.opencontainers.image.base.name": "scratch",
"org.opencontainers.image.created": "2025-04-04T00:00:00Z",
"org.opencontainers.image.revision": "fb4da0956290c3b216a35315510f66ca9bc4a460",
"org.opencontainers.image.source": "https://git.launchpad.net/cloud-images/+oci/ubuntu-base",
"org.opencontainers.image.url": "https://hub.docker.com/_/ubuntu",
"org.opencontainers.image.version": "20.04"
},
"platform": {
"architecture": "amd64",
"os": "linux",
"os.features": [
"erofs"
]
}
}
]
}
# nerdctl manifest inspect env12.com/library/ubuntu@sha256:7cfe388d681e8e39f44b025387f53fafc6bef12a95fda9561755d915347276ba
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:62184158ea39ddb98ae7df5c55ad73df8a0a9f6110f594db0bbe01b1224ee560",
"size": 2029
},
"layers": [
{
"mediaType": "application/vnd.erofs.layer.v1",
"digest": "sha256:34c9cce61ef84e29d092a45e64069667c7e3542e8481d4fe8725bb774bcd6167",
"size": 79568896
}
]
} |
Member
Author
# nerdctl image pull --snapshotter erofs env12.com/library/ubuntu:20.04-erofs-0621
env12.com/library/ubuntu:20.04-erofs-0621 saved
└──index-sha256:46e3aed7bc082f2386106b7b complete |++++++++++++++++++++++++++++++++++++++|
└──manifest-sha256:7cfe388d681e8e39f4 complete |++++++++++++++++++++++++++++++++++++++|
├──config-sha256:62184158ea39ddb98 complete |++++++++++++++++++++++++++++++++++++++|
└──layer-sha256:34c9cce61ef84e29d0 complete |++++++++++++++++++++++++++++++++++++++|
application/vnd.oci.image.index.v1+json sha256:46e3aed7bc082f2386106b7b3ac50089457840ab8717277941cfe94e32f96bdd
Completed pull from OCI Registry (env12.com/library/ubuntu:20.04-erofs-0621) elapsed: 7.6 stotal: 75.9 M (10.0 MiB/s)
# nerdctl image pull --snapshotter erofs env12.com/library/ubuntu:20.04-erofs-0621-zstd
env12.com/library/ubuntu:20.04-erofs-0621-zstd saved
└──index-sha256:6d253ab5bee747c31e242be7 complete |++++++++++++++++++++++++++++++++++++++|
└──manifest-sha256:bbff53e6a6c1e7fa4f complete |++++++++++++++++++++++++++++++++++++++|
├──config-sha256:5824adab6cbce42ae complete |++++++++++++++++++++++++++++++++++++++|
└──layer-sha256:be3e928c0084a1279b complete |++++++++++++++++++++++++++++++++++++++|
application/vnd.oci.image.index.v1+json sha256:6d253ab5bee747c31e242be763d43a8fae579f66d45ef4fe9e981059bdbd0e0a
Completed pull from OCI Registry (env12.com/library/ubuntu:20.04-erofs-0621-zstd) elapsed: 3.7 s total: 23.2 M (6.3 MiB/s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #4861