docker restart
Table of Contents:
Command Name:
docker restart
Description:
Restart one or more container
Syntax:
easywhatis$ docker restart --help
Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...]
Restart one or more containers
Options:
-t, --time int Seconds to wait for stop before killing the container (default 10)
easywhatis$
Example:
easywhatis$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
03bbc2ef54bf nginx "nginx -g 'daemon of..." 13 minutes ago Up 13 minutes 0.0.0.0:8080->80/tcp some-nginx
77735210dc15 nginx "nginx -g 'daemon of..." 17 minutes ago Up 16 minutes 80/tcp practical_solomon
easywhatis$ docker restart 03bbc2ef54bf
03bbc2ef54bf
easywhatis$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
03bbc2ef54bf nginx "nginx -g 'daemon of..." 14 minutes ago Up 3 seconds 0.0.0.0:8080->80/tcp some-nginx
77735210dc15 nginx "nginx -g 'daemon of..." 17 minutes ago Up 17 minutes 80/tcp practical_solomon