Expand description
OCI container image support for composefs.
This crate provides functionality for working with OCI (Open Container Initiative) container images in the context of composefs. It enables importing, extracting, and mounting container images as composefs filesystems with fs-verity integrity protection.
Key functionality includes:
- Pulling container images from registries using skopeo
- Converting OCI image layers from tar format to composefs split streams
- Creating mountable filesystems from OCI image configurations
- Importing from containers-storage with zero-copy reflinks (optional feature)
Re-exports§
pub use boot::boot_image;pub use boot::remove_boot_image;pub use oci_image::ImageInfo;pub use oci_image::LayerInfo;pub use oci_image::OCI_REF_PREFIX;pub use oci_image::OciFsckError;pub use oci_image::OciFsckResult;pub use oci_image::OciImage;pub use oci_image::OciImageNotFound;pub use oci_image::OciRefNotFound;pub use oci_image::SplitstreamInfo;pub use oci_image::add_referrer;pub use oci_image::layer_dumpfile;pub use oci_image::layer_info;pub use oci_image::layer_tar;pub use oci_image::list_images;pub use oci_image::list_referrers;pub use oci_image::list_refs;pub use oci_image::oci_fsck;pub use oci_image::oci_fsck_image;pub use oci_image::remove_referrer;pub use oci_image::remove_referrers_for_subject;pub use oci_image::resolve_ref;pub use oci_image::tag_image;pub use oci_image::untag_image;pub use skopeo::pull_image;pub use composefs;
Modules§
- boot
- Boot image management for OCI containers.
- cstor
- containers-storage integration for zero-copy layer import.
- image
- OCI image processing and filesystem construction.
- layer
- Shared layer import logic for OCI container images.
- oci_
image - OCI image and artifact storage for composefs.
- oci_
layout - Direct OCI layout directory import without the skopeo proxy.
- progress
- Re-exported from
composefs::progress; use that path directly in new code. - skopeo
- Container image pulling and registry interaction via skopeo/containers-image-proxy.
- tar
- TAR archive processing and split stream conversion.
Structs§
- Component
Id - Identity of a component being tracked, typically an OCI layer diff_id or an HTTP object path.
- Import
Stats - Statistics from an image import operation.
- Null
Reporter - A no-op reporter that discards all events.
- OciDigest
- OCI content-addressable digest type (e.g.
sha256:abcd...). - Open
Config - Parsed OCI config and its associated references.
- Pull
Options - Options for a
pulloperation. - Pull
Result - Result of a pull operation.
- Upgrade
Result - Result of a repository upgrade operation.
Enums§
- Local
Fetch Opt - Controls whether and how the
containers-storage:native import path is used when pulling images. - Progress
Event - Events emitted during a pull or download operation.
Constants§
- BOOT_
IMAGE_ REF_ KEY - Named ref key for the V2 boot EROFS image derived from this OCI config.
- BOOT_
IMAGE_ REF_ KEY_ V1 - Named ref key for the V1 boot EROFS image derived from this OCI config.
- IMAGE_
REF_ KEY - Named ref key for the V2 EROFS image derived from this OCI config.
- IMAGE_
REF_ KEY_ V1 - Named ref key for the V1 EROFS image derived from this OCI config.
Traits§
- Progress
Reporter - Receives progress events from a pull or download operation.
Functions§
- composefs_
boot_ erofs_ for_ config - Returns the boot EROFS ObjectID for
versionfrom the given OCI config, if any. - composefs_
boot_ erofs_ for_ manifest - Returns the boot EROFS ObjectID for an OCI image identified by manifest, if any.
- composefs_
erofs_ for_ config - Returns the composefs EROFS ObjectID for
versionreferenced by the given OCI config, if any. - composefs_
erofs_ for_ manifest - Returns the composefs EROFS ObjectID for an OCI image identified by manifest, if any.
- import_
layer - Imports a container layer from a tar stream into the repository.
- open_
config - Opens and parses a container configuration.
- pull
- Pull the target image, and add the provided tag. If this is a mountable image (i.e. not an artifact), it is not unpacked by default.
- upgrade_
repo - Upgrades all tagged OCI images in the repository to the current format.
- write_
config - Writes a container configuration to the repository.
- write_
config_ raw - Rewrites a container configuration in the repository from raw JSON bytes.
Type Aliases§
- Content
AndVerity - A tuple of (content digest, fs-verity ObjectID).
- Shared
Reporter - Convenience type alias for a shared, type-erased progress reporter.