21

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>
blindsnowmobile
  • 3,868
  • 6
  • 32
  • 47

1 Answers1

35

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.

programmerq
  • 6,262
  • 25
  • 40