Image
These methods resolve the active backend withmicrosandbox::backend::default_backend().
Image::get()
Example
Example
ImageNotFound when the reference is not present in the local cache.
Image::list()
Example
Example
Image::inspect()
Example
Example
Image::remove()
Example
Example
force is false, an image still referenced by one or more sandboxes returns ImageInUse.
Image::prune()
Example
Example
Image::load()
docker save tarballs and OCI Image Layout archives, so locally built images can be used without going through a registry. tags applies extra references to the first image in the archive. Returns a handle for every image reference imported.
Example
Example
Image::save()
ImageArchiveFormat selects the layout: Docker (loadable with docker load) or Oci (OCI Image Layout). Returns ImageNotFound when any reference is missing from the local cache.
Example
Example
Explicit local variants
Use these when your program owns a specificLocalBackend and should not depend on the process default backend.
Image::get_local()
Image::list_local()
Image::inspect_local()
Image::remove_local()
Image::prune_local()
Image::load_local()
Image::save_local()
ImageHandle
A lightweight metadata handle for a cached OCI image.h.reference()
Returns
&str
h.size_bytes()
Returns
Option<i64>
h.manifest_digest()
Returns
Option<&str>
h.architecture()
Returns
Option<&str>
h.os()
Returns
Option<&str>
h.layer_count()
Returns
usize
h.last_used_at()
Returns
Option<DateTime<Utc>>
h.created_at()
Returns
Option<DateTime<Utc>>
Types
ImageDetail
Returned by inspect()
Full detail for a cached image.ImageConfigDetail
Used by ImageDetail.config
OCI image config fields extracted from the local cache.ImageLayerDetail
Used by ImageDetail.layers
Metadata for one image layer.ImagePruneReport
Returned by prune()
Summary of cached image data removed byImage::prune().
ImageArchiveFormat
Used by save()
Archive layout to write when exporting images withImage::save().