Octopus.DockerStop exported 2026-07-22 by Octopus Deploy belongs to ‘Docker’ category.
Stops or Removes a Docker Resource created by a previous deployment.
Parameters
When this step is included in a project’s deployment process, the parameters below can be set.
Perform
Octopus.Action.Docker.Remove
Action to take place. ‘False’ to stop only, ‘True’ to stop and remove the resource.
Allowed values: False, True
Default: False
From Steps
Octopus.Action.Docker.RemoveSteps
Resources created from these Docker steps should be stopped (or stopped and removed). Specified as a comma-separated list of step action IDs. If left blank, resources from all Docker steps will be affected.
Match Environment
Octopus.Action.Docker.RemoveByEnvironment
Resources will be removed only where they also match the current environment.
Allowed values: True, False
Default: False
Match Release
Octopus.Action.Docker.RemoveByRelease
Resources will be removed only where they also match the current release.
Allowed values: True, False
Default: False
Match Tenant
Octopus.Action.Docker.RemoveByTenant
If the release includes tenants then resources will be removed only where they also match the currently deploying tenant.
Allowed values: True, False
Default: False
Custom Tag Filters
Octopus.Action.Docker.RemoveCustomTags
Tags included when searching for resources using the ‘—filter “label=X”’ argument. If the value is not provided, the resource will be included so long as the tag is present with any value. Specified as a JSON object mapping labels to values.
Example: {"app":"myapp"}
Timeout (sec)
Octopus.Action.Docker.StopTimeout
Seconds to wait for process to stop before killing it. The main process inside the container will receive SIGTERM, and after a grace period, SIGKILL.
Default: 10
Example: 10
Remove All
Octopus.Action.Docker.RemoveAll
If set, removes all matching Docker resources regardless of other filters.
Allowed values: True, False
Default: False
Step configuration using OCL
Example in Octopus Configuration Language (OCL):
step "stop-docker-containers" {
name = "Stop Docker Containers"
properties = {
Octopus.Action.TargetRoles = "docker-host"
}
action {
action_type = "Octopus.DockerStop"
properties = {
Octopus.Action.Docker.Remove = "True"
Octopus.Action.Docker.RemoveByEnvironment = "True"
Octopus.Action.Docker.RemoveByRelease = "True"
Octopus.Action.Docker.StopTimeout = "10"
Octopus.Action.RunOnServer = "false"
}
}
} Page updated on Wednesday, July 22, 2026