docker stop [OPTIONS] Container [Container ...]
OPTIONS
:命令选项,其中-t
指定等待多少秒后如果容器还没终止,就强行停止,默认等待10
秒;Container
:需要停止的容器,该容器用“容器ID
”或“容器名”表示。
// 停止一个名为firstContainer的容器
docker stop firstContainer
参考:https://www.educoder.net/shixuns/oiwsvgpf/challenges