From 686e6d31e7d4763d43a88c7e759b613e6ad2131f Mon Sep 17 00:00:00 2001 From: Chun Chen Date: Fri, 12 Jun 2015 16:20:23 +0800 Subject: [PATCH] Set exit code of old running container as 137 Signed-off-by: Chun Chen --- docs/reference/commandline/cli.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/reference/commandline/cli.md b/docs/reference/commandline/cli.md index 9d0fd40744..fc7dc0e234 100644 --- a/docs/reference/commandline/cli.md +++ b/docs/reference/commandline/cli.md @@ -1845,6 +1845,21 @@ The currently supported filters are: This shows all the containers that have exited with status of '0' +##### Killed containers + +You can use a filter to locate containers that exited with status of `137` meaning a `SIGKILL(9)` killed them. + + $ docker ps -a --filter 'exited=137' + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + b3e1c0ed5bfe ubuntu:latest "sleep 1000" 12 seconds ago Exited (137) 5 seconds ago grave_kowalevski + a2eb5558d669 redis:latest "/entrypoint.sh redi 2 hours ago Exited (137) 2 hours ago sharp_lalande + +Any of these events a result in `137` status: + +* the `init` process of the container is killed manually +* `docker kill` kills the container +* Docker daemon restarts which kills all old running containers + ## pull Usage: docker pull [OPTIONS] NAME[:TAG] | [REGISTRY_HOST[:REGISTRY_PORT]/]NAME[:TAG]