
Docker CLI ImageLs
CertifiedList Docker images on the host
Docker CLI ImageLs
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.
type: io.kestra.plugin.docker.cli.ImageLsExamples
List all Docker images on the host
id: docker_image_ls
namespace: company.team
tasks:
- id: list_images
type: io.kestra.plugin.docker.cli.ImageLs
Filter images by name
id: docker_image_ls_filter
namespace: company.team
tasks:
- id: list_alpine
type: io.kestra.plugin.docker.cli.ImageLs
imageNameFilter: alpine
Detect whether a pull changed the local image ID
id: docker_detect_image_change
namespace: company.team
tasks:
- id: before
type: io.kestra.plugin.docker.cli.ImageLs
imageNameFilter: alpine:latest
- id: pull
type: io.kestra.plugin.docker.cli.Pull
image: alpine:latest
- id: after
type: io.kestra.plugin.docker.cli.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"
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-docker --compatible-for $KESTRA_VERSION For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version. For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
Properties
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150config stringobject
Docker configuration file
Docker configuration file that can set access credentials to private container registries. Usually located in ~/.docker/config.json.
credentials
Credentials for a private container registry
Credentials for a private container registry.
The registry authentication.
The auth field is a base64-encoded authentication string of username: password or a token.
The identity token.
The registry password.
The registry URL.
If not defined, the registry will be extracted from the image name.
The registry token.
The registry username.
host string
Docker host or URI
The Docker daemon to connect to, e.g. tcp://localhost: 2375 or a Unix socket path. Defaults to the daemon available to the task runner.
imageNameFilter string
Filter images by name or reference
Applies Docker's reference filter: only images matching this reference pattern are returned. Accepts a repository name such as alpine (matches any tag of that repository), a full reference such as alpine: 3.18, or a wildcard pattern such as alp*. This is pattern matching, not an arbitrary substring match.
labelFilter object
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"}.
showAll booleanstring
falseInclude intermediate and dangling images
When true, intermediate build layers and untagged (dangling) images are included in the result. Defaults to false.
Outputs
count integer
0Number of images returned
images array
Listed images
A single image entry returned by ImageLs
Creation timestamp
Unix epoch seconds at which the image was created.
Image ID
Full image ID including the sha256: prefix.
Image labels
Repository digests
Content-addressable digests for the image, e.g. alpine@sha256: ....
Repository tags
Tags associated with the image, e.g. alpine: 3.18.
Image size in bytes