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

EXAMPLES

223              $ podman ps -a
224              CONTAINER ID   IMAGE         COMMAND         CREATED       STATUS                    PORTS     NAMES
225              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
226              69ed779d8ef9f  redis:alpine  "redis-server"  25 hours ago  Created                   6379/tcp  k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1
227
228
229
230              $ podman ps -a -s
231              CONTAINER ID   IMAGE         COMMAND         CREATED       STATUS                    PORTS     NAMES                                                                  SIZE
232              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
233              69ed779d8ef9f  redis:alpine  "redis-server"  25 hours ago  Created                   6379/tcp  k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1         27.49 MB
234
235
236
237              $ podman ps -a --format "{{.ID}}  {{.Image}}  {{.Labels}}  {{.Mounts}}"
238              02f65160e14ca  redis:alpine  tier=backend  proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/
239              69ed779d8ef9f  redis:alpine  batch=no,type=small  proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/
240
241
242
243              $ podman ps --ns -a
244              CONTAINER ID    NAMES                                                                   PID     CGROUP       IPC          MNT          NET          PIDNS        USER         UTS
245              3557d882a82e3   k8s_container2_podsandbox1_redhat.test.crio_redhat-test-crio_1          29910   4026531835   4026532585   4026532593   4026532508   4026532595   4026531837   4026532594
246              09564cdae0bec   k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1          29851   4026531835   4026532585   4026532590   4026532508   4026532592   4026531837   4026532591
247              a31ebbee9cee7   k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0   29717   4026531835   4026532585   4026532587   4026532508   4026532589   4026531837   4026532588
248
249
250
251              $ podman ps -a --size --sort names
252              CONTAINER ID   IMAGE         COMMAND         CREATED       STATUS                    PORTS     NAMES
253              69ed779d8ef9f  redis:alpine  "redis-server"  25 hours ago  Created                   6379/tcp  k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1
254              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
255
256
257
258              $ podman ps
259              CONTAINER ID  IMAGE                            COMMAND    CREATED        STATUS            PORTS                                                   NAMES
260              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
261              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
262
263
264
265

ps

267       Print a list of containers
268
269

SEE ALSO

271       podman(1)
272
273

HISTORY

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