Docker ImageLs

Docker ImageLs

Certified

List Docker images on the host

Lists images available on the Docker daemon and returns their IDs, repo tags, digests, and sizes. Useful for capturing an image ID before and after a pull to detect whether the image changed.

yaml
type: io.kestra.plugin.docker.ImageLs

List all Docker images on the host

yaml
id: docker_image_ls
namespace: company.team

tasks:
  - id: list_images
    type: io.kestra.plugin.docker.ImageLs

Filter images by name

yaml
id: docker_image_ls_filter
namespace: company.team

tasks:
  - id: list_alpine
    type: io.kestra.plugin.docker.ImageLs
    imageNameFilter: alpine

Detect whether a pull changed the local image ID

yaml
id: docker_detect_image_change
namespace: company.team

tasks:
  - id: before
    type: io.kestra.plugin.docker.ImageLs
    imageNameFilter: alpine:latest

  - id: pull
    type: io.kestra.plugin.docker.Pull
    image: alpine:latest

  - id: after
    type: io.kestra.plugin.docker.ImageLs
    imageNameFilter: alpine:latest

  - id: check
    type: io.kestra.plugin.core.flow.If
    condition: "{{ (outputs.before.images[0].id) != (outputs.after.images[0].id) }}"
    then:
      - id: updated
        type: io.kestra.plugin.core.log.Log
        message: "Image was updated"
    else:
      - id: unchanged
        type: io.kestra.plugin.core.log.Log
        message: "Image is up to date"
Properties

Docker configuration file

Docker configuration file that can set access credentials to private container registries. Usually located in ~/.docker/config.json.

Credentials for a private container registry

Definitions
authstring

The registry authentication.

The auth field is a base64-encoded authentication string of username: password or a token.

identityTokenstring

The identity token.

passwordstring

The registry password.

registrystring

The registry URL.

If not defined, the registry will be extracted from the image name.

registryTokenstring

The registry token.

usernamestring

The registry username.

The URI of your Docker host e.g. localhost

Filter images by name or reference

Only images whose repository or tag contains this string are returned. Accepts partial names such as alpine or full references such as alpine: 3.18.

Filter images by label

Only images that carry all of the supplied labels are returned. Each entry is a key/value pair, e.g. {"env": "prod"}.

Reference (ref) of the pluginDefaults to apply to this task.

Defaultfalse

Include intermediate and dangling images

When true, intermediate build layers and untagged (dangling) images are included in the result. Defaults to false.

Default0

Number of images returned

Listed images

Definitions
createdinteger

Creation timestamp

Unix epoch seconds at which the image was created.

idstring

Image ID

Full image ID including the sha256: prefix.

labelsobject
SubTypestring

Image labels

repoDigestsarray
SubTypestring

Repository digests

Content-addressable digests for the image, e.g. alpine@sha256: ....

repoTagsarray
SubTypestring

Repository tags

Tags associated with the image, e.g. alpine: 3.18.

sizeinteger

Image size in bytes