2014-04-16 14:07:55 -04:00
|
|
|
% DOCKER(1) Docker User Manuals
|
2014-06-30 22:58:04 -04:00
|
|
|
% Docker Community
|
|
|
|
% JUNE 2014
|
2014-04-16 14:07:55 -04:00
|
|
|
# NAME
|
|
|
|
docker-ps - List containers
|
|
|
|
|
|
|
|
# SYNOPSIS
|
2014-06-30 22:58:04 -04:00
|
|
|
**docker ps**
|
|
|
|
[**-a**|**--all**[=*false*]]
|
|
|
|
[**--before**[=*BEFORE*]]
|
2014-08-17 19:31:58 -04:00
|
|
|
[**-f**|**--filter**[=*[]*]]
|
2014-06-30 22:58:04 -04:00
|
|
|
[**-l**|**--latest**[=*false*]]
|
|
|
|
[**-n**[=*-1*]]
|
|
|
|
[**--no-trunc**[=*false*]]
|
|
|
|
[**-q**|**--quiet**[=*false*]]
|
|
|
|
[**-s**|**--size**[=*false*]]
|
|
|
|
[**--since**[=*SINCE*]]
|
|
|
|
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
List the containers in the local repository. By default this show only
|
|
|
|
the running containers.
|
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
**-a**, **--all**=*true*|*false*
|
2014-06-30 22:58:04 -04:00
|
|
|
Show all containers. Only running containers are shown by default. The default is *false*.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
**--before**=""
|
2014-06-30 22:58:04 -04:00
|
|
|
Show only container created before Id or Name, include non-running ones.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
2014-08-17 19:31:58 -04:00
|
|
|
**-f**, **--filter**=[]
|
|
|
|
Provide filter values. Valid filters:
|
|
|
|
exited=<int> - containers with exit code of <int>
|
2014-11-27 23:21:55 -05:00
|
|
|
status=(restarting|running|paused|exited)
|
2014-08-17 19:31:58 -04:00
|
|
|
|
2014-04-16 14:07:55 -04:00
|
|
|
**-l**, **--latest**=*true*|*false*
|
2014-06-30 22:58:04 -04:00
|
|
|
Show only the latest created container, include non-running ones. The default is *false*.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
2014-06-30 22:58:04 -04:00
|
|
|
**-n**=-1
|
|
|
|
Show n last created containers, include non-running ones.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
**--no-trunc**=*true*|*false*
|
2014-06-30 22:58:04 -04:00
|
|
|
Don't truncate output. The default is *false*.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
**-q**, **--quiet**=*true*|*false*
|
2014-06-30 22:58:04 -04:00
|
|
|
Only display numeric IDs. The default is *false*.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
**-s**, **--size**=*true*|*false*
|
2014-11-04 11:49:39 -05:00
|
|
|
Display total file sizes. The default is *false*.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
**--since**=""
|
|
|
|
Show only containers created since Id or Name, include non-running ones.
|
|
|
|
|
2014-06-30 22:58:04 -04:00
|
|
|
# EXAMPLES
|
2014-04-16 14:07:55 -04:00
|
|
|
# Display all containers, including non-running
|
|
|
|
|
|
|
|
# docker ps -a
|
|
|
|
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
|
|
|
a87ecb4f327c fedora:20 /bin/sh -c #(nop) MA 20 minutes ago Exit 0 desperate_brattain
|
|
|
|
01946d9d34d8 vpavlin/rhel7:latest /bin/sh -c #(nop) MA 33 minutes ago Exit 0 thirsty_bell
|
|
|
|
c1d3b0166030 acffc0358b9e /bin/sh -c yum -y up 2 weeks ago Exit 1 determined_torvalds
|
|
|
|
41d50ecd2f57 fedora:20 /bin/sh -c #(nop) MA 2 weeks ago Exit 0 drunk_pike
|
|
|
|
|
|
|
|
# Display only IDs of all containers, including non-running
|
|
|
|
|
|
|
|
# docker ps -a -q
|
|
|
|
a87ecb4f327c
|
|
|
|
01946d9d34d8
|
|
|
|
c1d3b0166030
|
|
|
|
41d50ecd2f57
|
|
|
|
|
|
|
|
# HISTORY
|
|
|
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
2014-07-01 20:30:25 -04:00
|
|
|
based on docker.com source material and internal work.
|
2014-06-30 22:58:04 -04:00
|
|
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2014-08-17 19:31:58 -04:00
|
|
|
August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2014-11-27 23:21:55 -05:00
|
|
|
November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|