Docker Rm

Docker Rm

Certified

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).

yaml
type: io.kestra.plugin.docker.cli.Rm

Remove multiple docker containers by ID

yaml
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

yaml
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

Docker configuration file

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

SubTypestring

Container IDs or names

List of container IDs, ID prefixes, or names to remove. For example: 8088357a1974, 8088, or my-app.

Credentials for a private container registry

Definitions
authstring

The registry authentication.

The auth field is a base64-encoded authentication string of username: password or a token.

identityTokenstring

The identity token.

passwordstring

The registry password.

registrystring

The registry URL.

If not defined, the registry will be extracted from the image name.

registryTokenstring

The registry token.

usernamestring

The registry username.

Defaultfalse

Force removal

Uses --force to delete running containers or referenced images.

The URI of your Docker host e.g. localhost

SubTypestring

Image IDs or references

List of image IDs or references (e.g. redis: 7-alpine, myregistry/foo: v1) to remove.

Reference (ref) of the pluginDefaults to apply to this task.

Defaultfalse

Remove volumes

When true, also deletes volumes attached to containers being removed.