
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 *Requiredstring
BUILDCONTAINERSIMAGESNETWORKSVOLUMESPrune type
One of BUILD, CONTAINERS, IMAGES, NETWORKS, or VOLUMES to target specific resources.
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.
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.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
until string
Until filter
For CONTAINERS, IMAGES, and NETWORKS: prune items created before this timestamp or duration (e.g., 10m, 1h30m) using daemon time.