Image value. These APIs inspect and prune images that have already been pulled by sandbox creation.
Image
Image.Get()
ErrImageNotFound when the image is not present in the local cache.
Image.List()
Image.Inspect()
Image.Remove()
force is false, sandboxes still referencing the image cause ErrImageInUse.
Image.Prune()
ImageHandle
Returned byImage.Get and Image.List.
| Method | Returns | Description |
|---|---|---|
Reference() | string | Image reference |
ManifestDigest() | string | Content-addressable manifest digest, or empty |
Architecture() | string | Resolved architecture, or empty |
OS() | string | Resolved operating system, or empty |
LayerCount() | uint | Number of layers |
SizeBytes() | *int64 | Total size, or nil when unknown |
CreatedAt() | time.Time | First-pulled time, or zero |
LastUsedAt() | time.Time | Last referenced time, or zero |
Remove(ctx, force) | error | Delete this image |
Inspect(ctx) | (*ImageDetail, error) | Fetch full detail for this image |
ImageDetail
ImageConfig
Parsed OCI config block.| Field | Type |
|---|---|
| Digest | string |
| Env | []string |
| Cmd | []string |
| Entrypoint | []string |
| WorkingDir | string |
| User | string |
| Labels | map[string]string |
| StopSignal | string |
ImageLayer
One layer in the image manifest.| Field | Type |
|---|---|
| DiffID | string |
| BlobDigest | string |
| MediaType | string |
| CompressedSizeBytes | *int64 |
| ErofsSizeBytes | *int64 |
| Position | int32 |