1podman-ps(1)()                                                  podman-ps(1)()
2
3
4

NAME

6       podman-ps - Prints out information about containers
7
8

SYNOPSIS

10       podman ps [options]
11
12
13       podman container list [options]
14
15
16       podman container ls [options]
17
18
19       podman container ps [options]
20
21
22       podman list [options]
23
24
25       podman ls [options]
26
27

DESCRIPTION

29       podman  ps  lists  the  running containers on the system. Use the --all
30       flag to view all the containers information.  By default it lists:
31
32
33              · container id
34
35              · the name of the image the container is using
36
37              · the COMMAND the container is executing
38
39              · the time the container was created
40
41              · the status of the container
42
43              · port mappings the container is using
44
45              · alternative names for the container
46
47
48

OPTIONS

50       --all, -a
51
52
53       Show all the containers, default is only running containers
54
55
56       --pod, -p
57
58
59       Display the pods the containers are associated with
60
61
62       --no-trunc
63
64
65       Display the extended information
66
67
68       --quiet, -q
69
70
71       Print the numeric IDs of the containers only
72
73
74       --format=format
75
76
77       Pretty-print containers to JSON or using a Go template
78
79
80       Valid placeholders for the Go template are listed below:
81
82
83       ┌────────────┬─────────────────────────────┐
84Placeholder Description                 
85       ├────────────┼─────────────────────────────┤
86       │.ID         │ Container ID                │
87       ├────────────┼─────────────────────────────┤
88       │.Image      │ Image Name/ID               │
89       ├────────────┼─────────────────────────────┤
90       │.ImageID    │ Image ID                    │
91       ├────────────┼─────────────────────────────┤
92       │.Command    │ Quoted command used         │
93       ├────────────┼─────────────────────────────┤
94       │.CreatedAt  │ Creation time for container │
95       ├────────────┼─────────────────────────────┤
96       │.RunningFor │ Time  elapsed  since   con‐ │
97       │            │ tainer was started          │
98       ├────────────┼─────────────────────────────┤
99       │.Status     │ Status of container         │
100       ├────────────┼─────────────────────────────┤
101       │.Pod        │ Pod  the container is asso‐ │
102       │            │ ciated with                 │
103       ├────────────┼─────────────────────────────┤
104       │.Ports      │ Exposed ports               │
105       ├────────────┼─────────────────────────────┤
106       │.Size       │ Size of container           │
107       ├────────────┼─────────────────────────────┤
108       │.Names      │ Name of container           │
109       ├────────────┼─────────────────────────────┤
110       │.Labels     │ All the labels assigned  to │
111       │            │ the container               │
112       ├────────────┼─────────────────────────────┤
113       │.Mounts     │ Volumes mounted in the con‐ │
114       │            │ tainer                      │
115       └────────────┴─────────────────────────────┘
116
117       --sort
118
119
120       Sort by command, created, id, image, names, runningfor, size,  or  sta‐
121       tus",  Note:  Choosing size will sort by size of rootFs, not alphabeti‐
122       cally like the rest of the options Default: created
123
124
125       --size, -s
126
127
128       Display the total file size
129
130
131       --last, -n
132
133
134       Print the n last created containers (all states)
135
136
137       --latest, -l
138
139
140       Show the latest container created (all states)
141
142
143       The latest option is not supported on the remote client.
144
145
146       --namespace, --ns
147
148
149       Display namespace information
150
151
152       --filter, -f
153
154
155       Filter what containers are shown in the output.  Multiple  filters  can
156       be  given with multiple uses of the --filter flag.  If multiple filters
157       are given, only containers which match all of the given filters will be
158       shown.   Results  will  be  drawn  from  all  containers, regardless of
159       whether --all was given.
160
161
162       Valid filters are listed below:
163
164
165       ┌─────────┬───────────────────────────────┐
166Filter   Description                   
167       ├─────────┼───────────────────────────────┤
168       │id       │ [ID] Container's ID           │
169       ├─────────┼───────────────────────────────┤
170       │name     │ [Name] Container's name       │
171       ├─────────┼───────────────────────────────┤
172       │label    │ [Key]  or  [Key=Value]  Label │
173       │         │ assigned to a container       │
174       ├─────────┼───────────────────────────────┤
175       │exited   │ [Int] Container's exit code   │
176       ├─────────┼───────────────────────────────┤
177       │status   │ [Status]  Container's status: │
178       │         │ 'created',          'exited', │
179       │         │ 'paused',          'running', │
180       │         │ 'unknown'                     │
181       ├─────────┼───────────────────────────────┤
182       │ancestor │ [ImageName] Image or  descen‐ │
183       │         │ dant used to create container │
184       ├─────────┼───────────────────────────────┤
185       │before   │ [ID]   or  [Name]  Containers │
186       │         │ created before this container │
187       ├─────────┼───────────────────────────────┤
188       │since    │ [ID]  or  [Name]   Containers │
189       │         │ created since this container  │
190       ├─────────┼───────────────────────────────┤
191       │volume   │ [VolumeName]  or [Mountpoint‐ │
192       │         │ Destination]  Volume  mounted │
193       │         │ in container                  │
194       ├─────────┼───────────────────────────────┤
195       │health   │ [Status] healthy or unhealthy │
196       └─────────┴───────────────────────────────┘
197
198       --help, -h
199
200
201       Print usage statement
202
203
204       --sync
205
206
207       Force a sync of container state with the OCI runtime.  In some cases, a
208       container's state in the runtime can become out of sync  with  Podman's
209       state.   This  will update Podman's state based on what the OCI runtime
210       reports.  Forcibly syncing is much slower, but can resolve inconsistent
211       state issues.
212
213
214       --watch, -w
215
216
217       Refresh the output with current containers on an interval in seconds.
218
219

EXAMPLES

221              $ podman ps -a
222              CONTAINER ID   IMAGE         COMMAND         CREATED       STATUS                    PORTS     NAMES
223              02f65160e14ca  redis:alpine  "redis-server"  19 hours ago  Exited (-1) 19 hours ago  6379/tcp  k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0
224              69ed779d8ef9f  redis:alpine  "redis-server"  25 hours ago  Created                   6379/tcp  k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1
225
226
227
228              $ podman ps -a -s
229              CONTAINER ID   IMAGE         COMMAND         CREATED       STATUS                    PORTS     NAMES                                                                  SIZE
230              02f65160e14ca  redis:alpine  "redis-server"  20 hours ago  Exited (-1) 20 hours ago  6379/tcp  k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0  27.49 MB
231              69ed779d8ef9f  redis:alpine  "redis-server"  25 hours ago  Created                   6379/tcp  k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1         27.49 MB
232
233
234
235              $ podman ps -a --format "{{.ID}}  {{.Image}}  {{.Labels}}  {{.Mounts}}"
236              02f65160e14ca  redis:alpine  tier=backend  proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/
237              69ed779d8ef9f  redis:alpine  batch=no,type=small  proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/
238
239
240
241              $ podman ps --ns -a
242              CONTAINER ID    NAMES                                                                   PID     CGROUP       IPC          MNT          NET          PIDNS        USER         UTS
243              3557d882a82e3   k8s_container2_podsandbox1_redhat.test.crio_redhat-test-crio_1          29910   4026531835   4026532585   4026532593   4026532508   4026532595   4026531837   4026532594
244              09564cdae0bec   k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1          29851   4026531835   4026532585   4026532590   4026532508   4026532592   4026531837   4026532591
245              a31ebbee9cee7   k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0   29717   4026531835   4026532585   4026532587   4026532508   4026532589   4026531837   4026532588
246
247
248
249              $ podman ps -a --size --sort names
250              CONTAINER ID   IMAGE         COMMAND         CREATED       STATUS                    PORTS     NAMES
251              69ed779d8ef9f  redis:alpine  "redis-server"  25 hours ago  Created                   6379/tcp  k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1
252              02f65160e14ca  redis:alpine  "redis-server"  19 hours ago  Exited (-1) 19 hours ago  6379/tcp  k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0
253
254
255
256              $ podman ps
257              CONTAINER ID  IMAGE                            COMMAND    CREATED        STATUS            PORTS                                                   NAMES
258              4089df24d4f3  docker.io/library/centos:latest  /bin/bash  2 minutes ago  Up 2 minutes ago  0.0.0.0:80->8080/tcp, 0.0.0.0:2000-2006->2000-2006/tcp  manyports
259              92f58933c28c  docker.io/library/centos:latest  /bin/bash  3 minutes ago  Up 3 minutes ago  192.168.99.100:1000-1006->1000-1006/tcp                 zen_sanderson
260
261
262
263

ps

265       Print a list of containers
266
267

SEE ALSO

269       podman(1)
270
271

HISTORY

273       August 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com
274       ⟨mailto:umohnani@redhat.com⟩
275
276
277
278                                                                podman-ps(1)()
Impressum