
Docker Rm
CertifiedRemove Docker containers or images
Docker Rm
Remove Docker containers or images
Deletes containers and/or images using the Docker daemon. Supports force deletion and removing attached volumes; defaults to safe (force=false, removeVolumes=false).
type: io.kestra.plugin.docker.cli.RmExamples
Remove multiple docker containers by ID
id: docker_remove_containers
namespace: company.team
tasks:
- id: remove_containers
type: io.kestra.plugin.docker.cli.Rm
force: true
containerIds:
- 947795c71c71
- 5ad36bff753e
Remove docker containers by name
id: docker_remove_containers_by_name
namespace: company.team
tasks:
- id: remove_containers
type: io.kestra.plugin.docker.cli.Rm
force: true
containerIds:
- my-app
- my-worker
Properties
config stringobject
Docker configuration file
Docker configuration file that can set access credentials to private container registries. Usually located in ~/.docker/config.json.
containerIds array
Container IDs or names
List of container IDs, ID prefixes, or names to remove. For example: 8088357a1974, 8088, or my-app.
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.
force booleanstring
falseForce removal
Uses --force to delete running containers or referenced images.
host string
The URI of your Docker host e.g. localhost
imageIds array
Image IDs or references
List of image IDs or references (e.g. redis: 7-alpine, myregistry/foo: v1) to remove.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
removeVolumes booleanstring
falseRemove volumes
When true, also deletes volumes attached to containers being removed.