Actions42
- Container Actions
- Image Actions
- Network Actions
- System Actions
- Volume Actions
Container → Remove
AI-generatedSummary
Remove a Docker container
Inputs
- containerId (required) — Container name or full/short container ID
- force — Whether to force container removal
- removeVolumes — Whether to remove anonymous volumes attached to the container
Output shape
no body — success/failure only
Returns an acknowledgment of removal; may error if the container does not exist or is in use.
Examples
Example 1: Remove a stopped container by ID
Set containerId to the container's ID; leave force and removeVolumes as false.
Example 2: Force removal of a running container and delete its volumes
Enable force and removeVolumes; provide containerId.
Example 3: Remove a container within a workflow step
Only containerId is mandatory; other flags are optional.