目录
当前位置: 首页 > 文档资料 > Docker 简明教程 >

3.4.22 start/stop/restart

优质
小牛编辑
125浏览
2023-12-01

start

  • 用法
Usage: docker start [OPTIONS] CONTAINER [CONTAINER...]

Start one or more stopped containers

-a, --attach=false         Attach STDOUT/STDERR and forward signals
--help=false               Print usage
-i, --interactive=false    Attach container's STDIN

stop

  • 用法
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]

Stop a running container by sending SIGTERM and then SIGKILL after a
grace period

--help=false       Print usage
-t, --time=10      Seconds to wait for stop before killing it

restart

  • 用法
Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...]

Restart a running container

--help=false       Print usage
-t, --time=10      Seconds to wait for stop before killing the container