mirror of
https://github.com/containerd/containerd.git
synced 2026-08-12 12:14:44 +00:00
Add `ctr images build-erofs-cache <image> <cache_dir>`, which reads an already-pulled image's layers from the content store, converts each into a directly-mountable erofs blob, and writes them under <cache_dir>/<algorithm>/<hex>.erofs keyed by the layer's diffID. This populates the directory the erofs snapshotter's layer_content_cache reads on pull; because the key is the source diffID, layers shared across images converge on one blob. No converted image is produced. Extract the per-layer uncompress + mkfs.erofs step out of LayerConvertFunc into an exported ConvertLayerToErofs so the image converter and the cache builder share a single conversion path. Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>