
Prune
Prune unused containers, images, networks, and volumes.
Use this task to clean your environment and delete unused containers/images/networks/volumes
type: "io.kestra.plugin.docker.Prune"Examples
Prune all docker images
id: docker_prune_images
namespace: company.team
tasks:
- id: prune_images
type: io.kestra.plugin.docker.Prune
pruneType: IMAGES
dangling: true
Properties
pruneType*Requiredstring
BUILDCONTAINERSIMAGESNETWORKSVOLUMESPrune type.
Type of docker object you want to prune : - BUILD - CONTAINERS - IMAGES - NETWORKS - VOLUMES
configstringobject
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.
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.
danglingbooleanstring
falseDangling
When set to true, prune only unused and untagged images. When set to false, all unused images are pruned. Meaningful only for IMAGES prune types.
hoststring
The URI of your Docker host e.g. localhost
labelFiltersarray
Label filters
Prune containers with the specified labels.
untilstring
Until filter
Prune containers created before this timestamp. Meaningful only for CONTAINERS and IMAGES prune types. Can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g., 10m, 1h30m) computed relative to the daemon machine’s time.