FahamLah

Commands

docker stop

docker stop <container>

Risk: Safe

What it does

Asks a container to stop, then forces it after 10 seconds.

When to use it

When you are done with a container for now.

Example

$ docker stop web

Stop web. It still exists.

$ docker start web

Start it again.

$ docker restart web

Stop and start in one go.

$ docker kill web

Stop at once, no clean-up (exit 137).

$ docker pause web

Freeze it; docker unpause web wakes it.