Image
A container image.
Fields
architecture @ StrCPU architecture, such as
"amd64".cmd @ (Array[Str] | nil)Default command, or
nilwhen unset.created @ StrCreation timestamp, as the runtime reports it.
entrypoint @ (Array[Str] | nil)Entrypoint, or
nilwhen unset.env @ Dict[Str, Str]Environment variables.
id @ StrFull image ID,
sha256:....labels @ (Dict[Str, Str] | nil)Labels, or
nilwhen the image has none.layers @ Array[Str]Layer digests.
os @ StrOperating system, such as
"linux".size @ IntImage size in bytes.
user @ (Str | nil)Default user, or
nilwhen unset.working_dir @ (fs.Path | nil)Working directory, or
nilwhen unset.
Methods
remove …
Removes the image.
Parameters
| Name | Type | Description |
|---|---|---|
:force? |
Bool |
Remove the image even if containers use it, removing them too. |
save target … -> (Str | fs.Path)
Saves the image to an archive or directory, returning target.
Parameters
| Name | Type | Description |
|---|---|---|
target |
(Str | fs.Path) |
Archive path or directory to write. |
:format? |
ArchiveFormat |
Archive format. |
:platform? |
Platform |
Platform to save. |
tag new_tag
Tags the image with a new name.
Parameters
| Name | Type | Description |
|---|---|---|
new_tag |
Str |
Reference to tag the image as. |
tags() -> Array[ImageTag]
Returns the current tags, which are empty for an untagged image.