
Docker ImageLs
CertifiedList Docker images on the host
Docker 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.ImageLsExamples
List all Docker images on the host
id: docker_image_ls
namespace: company.team
tasks:
- id: list_images
type: io.kestra.plugin.docker.ImageLs
Filter images by name
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
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
config 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
The URI of your Docker host e.g. localhost
imageNameFilter string
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.
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"}.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
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