EROFS is a read-only filesystem supported by containerd's erofs snapshotter and differ. nerdctl can convert image layers to EROFS media types with nerdctl image convert --erofs.
- Install containerd with the
erofssnapshotter and differ plugins enabled. - Install
mkfs.erofsfornerdctl image convert --erofs.
Check that containerd has loaded the EROFS plugins:
ctr plugins ls | grep erofscontainerd 2.3+ provides an EROFS unpack configuration by default when the erofs snapshotter and differ plugins are available.
If plugins."io.containerd.transfer.v1.local".unpack_config is configured manually, add an EROFS entry to /etc/containerd/config.toml and restart containerd:
[[plugins."io.containerd.transfer.v1.local".unpack_config]]
platform = "linux(+erofs)/amd64"
snapshotter = "erofs"
differ = "erofs"Replace amd64 with the target architecture as needed. The linux(+erofs)/ARCH entry also allows the erofs snapshotter to unpack regular linux/ARCH tar/gzip images.
Convert an image to raw EROFS blobs:
nerdctl image convert --erofs raw example.com/foo:latest example.com/foo:erofsConvert an image to zstd-compressed EROFS blobs:
nerdctl image convert --erofs zstd example.com/foo:latest example.com/foo:erofs-zstd--erofs-compressors passes compressor options to mkfs.erofs, and --erofs-mkfs-options passes extra mkfs.erofs options. See command-reference.md for flag details.
Push the converted image to a registry, then pull it with the erofs snapshotter:
nerdctl image pull --snapshotter erofs example.com/foo:erofs