Prune
Prune unused containers, images, networks, 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
BUILD
CONTAINERS
IMAGES
NETWORKS
VOLUMES
Prune type.
Type of docker object you want to prune : - BUILD - CONTAINERS - IMAGES - NETWORKS - VOLUMES
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
dangling booleanstring
false
Dangling.
When set to true, prune only unused and untagged images. When set to false, all unused images are pruned. Meaningful only for IMAGES prune type
host string
The URI of your Docker host e.g. localhost
labelFilters array
Label filters.
Prune containers with the specified labels.
until string
Until filter.
Prune containers created before this timestamp Meaningful only for CONTAINERS and IMAGES prune type Can be Unix timestamps, date formatted timestamps, or Go duration strings (e. g. 10m, 1h30m) computed relative to the daemon machine’s time.
Definitions
Credentials for a private container registry.
auth string
The registry authentication.
The auth
field is a base64-encoded authentication string of username: password
or a token.
identityToken string
The identity token.
password string
The registry password.
registry string
The registry URL.
If not defined, the registry will be extracted from the image name.
registryToken string
The registry token.
username string
The registry username.