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 ps [options]
14
15
16       podman container list [options]
17
18
19       podman container ls [options]
20
21

DESCRIPTION

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

OPTIONS

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

EXAMPLES

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

ps

271       Print a list of containers
272
273

SEE ALSO

275       podman(1), buildah(1), crio(8)
276
277

HISTORY

279       August 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com
280       ⟨mailto:umohnani@redhat.com⟩
281
282
283
284                                                                podman-ps(1)()
Impressum