Skip to main content
See Images for image sources and caching behavior. These APIs manage the local image cache.

Image

Microsandbox::Image.get()

Look up a cached image.

Parameters

referenceString
Image reference.

Returns

ImageHandle
Look up a cached image.

Microsandbox::Image.list()

List cached images.

Returns

Array<ImageHandle>
List cached images.

Microsandbox::Image.remove()

Remove a cached image.

Parameters

referenceString
Image reference.
forceBoolean
Force removal; optional positional argument, defaults to false.

Returns

nil
No return value.

Microsandbox::Image.prune()

Prune unused cached images.

Returns

Hash
String keys: image_refs_removed, manifests_removed, layers_removed, and bytes_reclaimed.
Ruby does not expose a standalone image pull method. Select an OCI reference using image: when creating a sandbox.

ImageHandle

image.reference

Returns

String
Image reference.

image.size_bytes

Returns

Integer | nil
Cached size.

image.manifest_digest

Returns

String | nil
Manifest digest.

image.architecture

Returns

String | nil
Image platform.

image.os

Returns

String | nil
Image platform.

image.layer_count

Returns

Integer
Number of layers.

image.created_at

Returns

String | nil
RFC 3339 creation timestamp.