Docker CLI

docker stop

Request shutdown; the configured signal is followed by forced termination if the grace period expires. Review data and service dependencies first. Example assumes an existing container you created in the approved disposable lab; confirm context and ownership before use.

Formal Syntax & Structure

docker syntaxdocker
docker stop [OPTIONS] CONTAINER [CONTAINER...]

Parameters & Attributes

NameTypeDescription
CONTAINERstringRunning lab container name or ID.
--timeoutintegerGrace period in seconds; select for the workload.

Return Value

CLI output

Name or ID on success; error on failure.

Working Example

Example Snippetdocker
docker stop -t 2 bm02-cycle
Docker Reference