Reputation: 4308
As it relates to stopping/starting a container?
After stopping a container:
docker stop <container id>
It seems like I can run either "start" or "restart" to bring it back up. I'm wondering if there is any difference, or if they are functionally equivalent:
docker restart <container id>
docker start <container id>
Upvotes: 24
Views: 12600
Reputation: 6554
The docker restart
command will issue a stop and then a start. If the container is already stopped, it is functionally the same as docker start
. The difference is if you are trying to do the operation on a container that may or may not be running, docker restart
is more robust in this situation.
Upvotes: 38