
Docker Prune
CertifiedPrune unused Docker resources
Docker Prune
Prune unused Docker resources
Cleans up unused Docker build cache, containers, images, networks, or volumes via the daemon. Prune type is required; dangling defaults to false.
type: io.kestra.plugin.docker.cli.PruneExamples
Prune all docker images
id: docker_prune_images
namespace: company.team
tasks:
- id: prune_images
type: io.kestra.plugin.docker.cli.Prune
pruneType: IMAGES
dangling: true
Properties
pruneType *string
BUILDCONTAINERSIMAGESNETWORKSVOLUMESPrune type
One of BUILD, CONTAINERS, IMAGES, NETWORKS, or VOLUMES to target specific resources.
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.
dangling booleanstring
falseDangling only
For IMAGES prune type: true prunes only unused untagged images; false prunes all unused images.
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.
labelFilters array
Label filters
Optional labels used to filter the resources being pruned; applies to whichever pruneType is selected.
until string
Until filter
For CONTAINERS, IMAGES, and NETWORKS: prune items created before this timestamp or duration (e.g., 10m, 1h30m) using daemon time.