Prune unused containers, images, networks, volumes.

Use this task to clean your environment and delete unused containers/images/networks/volumes

yaml
type: "io.kestra.plugin.docker.Prune"

Prune all docker images

yaml
id: docker_prune_images
namespace: company.team

tasks:
  - id: prune_images
    type: io.kestra.plugin.docker.Prune
    pruneType: IMAGES
    dangling: true
Properties
Possible Values
BUILDCONTAINERSIMAGESNETWORKSVOLUMES

Prune type.

Type of docker object you want to prune : - BUILD - CONTAINERS - IMAGES - NETWORKS - VOLUMES

Docker configuration file.

Docker configuration file that can set access credentials to private container registries. Usually located in ~/.docker/config.json.

Default 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

The URI of your Docker host e.g. localhost

SubType string

Label filters.

Prune containers with the specified labels.

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.

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.