2014-04-16 22:07:55 +04:00
|
|
|
% DOCKER(1) Docker User Manuals
|
2014-07-01 06:58:04 +04:00
|
|
|
% Docker Community
|
2015-02-19 18:18:58 +03:00
|
|
|
% FEBRUARY 2015
|
2014-04-16 22:07:55 +04:00
|
|
|
# NAME
|
|
|
|
docker-ps - List containers
|
|
|
|
|
|
|
|
# SYNOPSIS
|
2014-07-01 06:58:04 +04:00
|
|
|
**docker ps**
|
|
|
|
[**-a**|**--all**[=*false*]]
|
|
|
|
[**--before**[=*BEFORE*]]
|
2014-10-16 01:14:12 +04:00
|
|
|
[**--help**]
|
2014-08-18 03:31:58 +04:00
|
|
|
[**-f**|**--filter**[=*[]*]]
|
2014-07-01 06:58:04 +04:00
|
|
|
[**-l**|**--latest**[=*false*]]
|
|
|
|
[**-n**[=*-1*]]
|
|
|
|
[**--no-trunc**[=*false*]]
|
|
|
|
[**-q**|**--quiet**[=*false*]]
|
|
|
|
[**-s**|**--size**[=*false*]]
|
|
|
|
[**--since**[=*SINCE*]]
|
|
|
|
|
2014-04-16 22: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-07-01 06:58:04 +04:00
|
|
|
Show all containers. Only running containers are shown by default. The default is *false*.
|
2014-04-16 22:07:55 +04:00
|
|
|
|
|
|
|
**--before**=""
|
2014-07-01 06:58:04 +04:00
|
|
|
Show only container created before Id or Name, include non-running ones.
|
2014-04-16 22:07:55 +04:00
|
|
|
|
2014-10-16 01:14:12 +04:00
|
|
|
**--help**
|
|
|
|
Print usage statement
|
|
|
|
|
2014-08-18 03:31:58 +04:00
|
|
|
**-f**, **--filter**=[]
|
|
|
|
Provide filter values. Valid filters:
|
|
|
|
exited=<int> - containers with exit code of <int>
|
2015-02-17 03:36:03 +03:00
|
|
|
label=<key> or label=<key>=<value>
|
2014-11-28 07:21:55 +03:00
|
|
|
status=(restarting|running|paused|exited)
|
2015-02-19 18:18:58 +03:00
|
|
|
name=<string> - container's name
|
|
|
|
id=<ID> - container's ID
|
2014-08-18 03:31:58 +04:00
|
|
|
|
2014-04-16 22:07:55 +04:00
|
|
|
**-l**, **--latest**=*true*|*false*
|
2014-07-01 06:58:04 +04:00
|
|
|
Show only the latest created container, include non-running ones. The default is *false*.
|
2014-04-16 22:07:55 +04:00
|
|
|
|
2014-07-01 06:58:04 +04:00
|
|
|
**-n**=-1
|
|
|
|
Show n last created containers, include non-running ones.
|
2014-04-16 22:07:55 +04:00
|
|
|
|
|
|
|
**--no-trunc**=*true*|*false*
|
2014-07-01 06:58:04 +04:00
|
|
|
Don't truncate output. The default is *false*.
|
2014-04-16 22:07:55 +04:00
|
|
|
|
|
|
|
**-q**, **--quiet**=*true*|*false*
|
2014-07-01 06:58:04 +04:00
|
|
|
Only display numeric IDs. The default is *false*.
|
2014-04-16 22:07:55 +04:00
|
|
|
|
|
|
|
**-s**, **--size**=*true*|*false*
|
2014-11-04 19:49:39 +03:00
|
|
|
Display total file sizes. The default is *false*.
|
2014-04-16 22:07:55 +04:00
|
|
|
|
|
|
|
**--since**=""
|
|
|
|
Show only containers created since Id or Name, include non-running ones.
|
|
|
|
|
2014-07-01 06:58:04 +04:00
|
|
|
# EXAMPLES
|
2014-04-16 22: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
|
|
|
|
|
2015-02-19 18:18:58 +03:00
|
|
|
# Display only IDs of all containers that have the name `determined_torvalds`
|
|
|
|
|
|
|
|
# docker ps -a -q --filter=name=determined_torvalds
|
|
|
|
c1d3b0166030
|
|
|
|
|
2014-04-16 22:07:55 +04:00
|
|
|
# HISTORY
|
|
|
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
2014-07-02 04:30:25 +04:00
|
|
|
based on docker.com source material and internal work.
|
2014-07-01 06:58:04 +04:00
|
|
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2014-08-18 03:31:58 +04:00
|
|
|
August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2014-11-28 07:21:55 +03:00
|
|
|
November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2015-02-19 18:18:58 +03:00
|
|
|
February 2015, updated by André Martins <martins@noironetworks.com>
|