wait

suspend fun wait(id: String, condition: String? = null): Result<ContainerWaitResponse, ErrorResponse>

Wait for a container

Block until a container stops, then returns the exit code.

Return

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

Parameters

id

Container ID or name.

condition

Docker wait condition: not-running (default), next-exit, or removed.