1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/docs/man/docker-ps.1.md
Sebastiaan van Stijn 7d89e66dac Add labels documentation
Adds more documentation for labels and adds the label instruction to the
man-pages.

Also included is a document called "Labels - custom meta-data in Docker"
in the user-guide, this is still a work-in-progress I started to describe
the "namespaces" conventions, an example on storing structured data.

I ran a bit "out of steam" (writers block?) on that document, but kept
it in (for now), in case it still ends up useful.

The Remote API documentation changes will need to be moved to the
docker_remote_api_v1.18.md document when rebasing the whole PR.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-03-13 10:02:04 -07:00

3 KiB

% DOCKER(1) Docker User Manuals % Docker Community % FEBRUARY 2015

NAME

docker-ps - List containers

SYNOPSIS

docker ps [-a|--all[=false]] [--before[=BEFORE]] [--help] [-f|--filter[=[]]] [-l|--latest[=false]] [-n[=-1]] [--no-trunc[=false]] [-q|--quiet[=false]] [-s|--size[=false]] [--since[=SINCE]]

DESCRIPTION

List the containers in the local repository. By default this show only the running containers.

OPTIONS

-a, --all=true|false Show all containers. Only running containers are shown by default. The default is false.

--before="" Show only container created before Id or Name, include non-running ones.

--help Print usage statement

-f, --filter=[] Provide filter values. Valid filters: exited= - containers with exit code of label= or label== status=(restarting|running|paused|exited) name= - container's name id= - container's ID

-l, --latest=true|false Show only the latest created container, include non-running ones. The default is false.

-n=-1 Show n last created containers, include non-running ones.

--no-trunc=true|false Don't truncate output. The default is false.

-q, --quiet=true|false Only display numeric IDs. The default is false.

-s, --size=true|false Display total file sizes. The default is false.

--since="" Show only containers created since Id or Name, include non-running ones.

EXAMPLES

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

Display only IDs of all containers that have the name determined_torvalds

# docker ps -a -q --filter=name=determined_torvalds
c1d3b0166030

HISTORY

April 2014, Originally compiled by William Henry (whenry at redhat dot com) based on docker.com source material and internal work. June 2014, updated by Sven Dowideit SvenDowideit@home.org.au August 2014, updated by Sven Dowideit SvenDowideit@home.org.au November 2014, updated by Sven Dowideit SvenDowideit@home.org.au February 2015, updated by André Martins martins@noironetworks.com