
Docker CLI Stop
CertifiedStop or kill a Docker container
Docker CLI Stop
Stop or kill a Docker container
Stops a running container by default, or kills it when kill is true, then optionally deletes it. Defaults: kill=false, delete=true.
type: io.kestra.plugin.docker.cli.StopExamples
Kill a Docker container by ID
id: docker_stop
namespace: company.team
tasks:
- id: stop
type: io.kestra.plugin.docker.cli.Stop
containerId: 8088357a1974
kill: true
Stop a Docker container by name
id: docker_stop_by_name
namespace: company.team
tasks:
- id: stop
type: io.kestra.plugin.docker.cli.Stop
containerId: my-app
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-docker --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.
Properties
containerId *string
Container ID or name
ID, ID prefix, or name of the container to stop or kill. For example: 8088357a1974, 8088, or my-app.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150config stringobject
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
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.
delete booleanstring
trueDelete container after stop
Defaults to true; set false to keep the container after stopping/killing.
host string
Docker host or URI
The Docker daemon to connect to, e.g. tcp://localhost: 2375 or a Unix socket path. Defaults to the daemon available to the task runner.
kill booleanstring
falseKill instead of stop
When true, sends SIGKILL; otherwise uses a graceful stop.