kill

suspend fun kill(id: String, signal: String? = null): Result<Unit, ErrorResponse>

Kill a container

Send a POSIX signal to a container, defaulting to killing to the container with SIGKILL.

Return

Operation response on success, or the Docker error response. Transport failures and cancellation can throw.

Parameters

id

Container ID or name.

signal

Stop/kill signal; null leaves the daemon default.