Skip to content

Image

A container image.

Fields

id

Full image ID (sha256:...)

created

Creation timestamp

size

Image size in bytes

layers

Array of layer digest strings

architecture

CPU architecture (e.g. "amd64")

os

Operating system (e.g. "linux")

cmd

Command (array of str)

entrypoint

Entrypoint (array of str)

env

Environment (a dict)

working_dir

Working directory (a Path)

user

User (str)

labels

Labels (dict)A

Methods

tags()

Current tags, or an empty array for untagged images.

tag new_tag

Tag the image with a new name.

img.tag "registry.example.com/myapp:v1.2"

remove :force?

Remove the image.

  • force: force removal even if the image is in use
img.remove()
img.remove force: true

save target :format? :platform?

Save the image to an archive or directory.