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

EXAMPLES

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

ps

269       Print a list of containers
270
271

SEE ALSO

273       podman(1), buildah(1), crio(8)
274
275

HISTORY

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