docker stop
Table of Contents:
Command Name:
docker stop
Description:
Stop one or more running containers.
Syntax:
easywhatis$ docker stop --help
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
Stop one or more running containers
Options:
-t, --time int Seconds to wait for stop before killing it (default 10)
easywhatis$
Example:
easywhatis$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a5bb226d1850 ubuntu "bash" 10 hours ago Up 2 seconds eloquent_knuth
easywhatis$ docker stop a5bb226d1850
a5bb226d1850
easywhatis$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a5bb226d1850 ubuntu "bash" 10 hours ago Exited (0) 2 seconds ago eloquent_knuth
easywhatis$