.nh .TH podman\-ps(1) .SH NAME .PP podman\-ps \- Prints out information about containers .SH SYNOPSIS .PP \fBpodman ps\fP [\fIoptions\fP] .PP \fBpodman container ps\fP [\fIoptions\fP] .PP \fBpodman container list\fP [\fIoptions\fP] .PP \fBpodman container ls\fP [\fIoptions\fP] .SH DESCRIPTION .PP \fBpodman ps\fP lists the running containers on the system. Use the \fB\-\-all\fP flag to view all the containers information. By default it lists: .RS .IP \(bu 2 container id .IP \(bu 2 the name of the image the container is using .IP \(bu 2 the COMMAND the container is executing .IP \(bu 2 the time the container was created .IP \(bu 2 the status of the container .IP \(bu 2 port mappings the container is using .IP \(bu 2 alternative names for the container .RE .SH OPTIONS .SS \fB\-\-all\fP, \fB\-a\fP .PP Show all the containers created by Podman, default is only running containers. .PP Note: Podman shares containers storage with other tools such as Buildah and CRI\-O. In some cases these \fB\fCexternal\fR containers might also exist in the same storage. Use the \fB\fC\-\-external\fR option to see these external containers. External containers show the 'storage' status. .SS \fB\-\-external\fP .PP Display external containers that are not controlled by Podman but are stored in containers storage. These external containers are generally created via other container technology such as Buildah or CRI\-O and may depend on the same container images that Podman is also using. External containers are denoted with either a 'buildah' or 'storage' in the COMMAND and STATUS column of the ps output. Only used with the \-\-all option. .SS \fB\-\-filter\fP, \fB\-f\fP .PP Filter what containers are shown in the output. Multiple filters can be given with multiple uses of the \-\-filter flag. Filters with the same key work inclusive with the only exception being \fB\fClabel\fR which is exclusive. Filters with different keys always work exclusive. .PP Valid filters are listed below: .TS allbox; l l l l . \fB\fC\fBFilter\fP\fR \fB\fC\fBDescription\fP\fR id T{ [ID] Container's ID (accepts regex) T} name T{ [Name] Container's name (accepts regex) T} label T{ [Key] or [Key=Value] Label assigned to a container T} exited [Int] Container's exit code status T{ [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' T} ancestor T{ [ImageName] Image or descendant used to create container T} before T{ [ID] or [Name] Containers created before this container T} since T{ [ID] or [Name] Containers created since this container T} volume T{ [VolumeName] or [MountpointDestination] Volume mounted in container T} health [Status] healthy or unhealthy pod T{ [Pod] name or full or partial ID of pod T} network T{ [Network] name or full ID of network T} .TE .SS \fB\-\-format\fP=\fIformat\fP .PP Pretty\-print containers to JSON or using a Go template .PP Valid placeholders for the Go template are listed below: .TS allbox; l l l l . \fB\fC\fBPlaceholder\fP\fR \fB\fC\fBDescription\fP\fR \&.ID Container ID \&.Image Image Name/ID \&.ImageID Image ID \&.Command Quoted command used \&.CreatedAt Creation time for container \&.RunningFor T{ Time elapsed since container was started T} \&.Status Status of container \&.Pod T{ Pod the container is associated with T} \&.Ports Exposed ports \&.Size Size of container \&.Names Name of container \&.Networks T{ Show all networks connected to the container T} \&.Labels T{ All the labels assigned to the container T} \&.Mounts T{ Volumes mounted in the container T} .TE .SS \fB\-\-help\fP, \fB\-h\fP .PP Print usage statement .SS \fB\-\-last\fP, \fB\-n\fP .PP Print the n last created containers (all states) .SS \fB\-\-latest\fP, \fB\-l\fP .PP Show the latest container created (all states) .PP The latest option is not supported on the remote client. .SS \fB\-\-namespace\fP, \fB\-\-ns\fP .PP Display namespace information .SS \fB\-\-no\-trunc\fP .PP Display the extended information .SS \fB\-\-pod\fP, \fB\-p\fP .PP Display the pods the containers are associated with .SS \fB\-\-quiet\fP, \fB\-q\fP .PP Print the numeric IDs of the containers only .SS \fB\-\-sort\fP .PP Sort by command, created, id, image, names, runningfor, size, or status", Note: Choosing size will sort by size of rootFs, not alphabetically like the rest of the options Default: created .SS \fB\-\-size\fP, \fB\-s\fP .PP Display the total file size .SS \fB\-\-sync\fP .PP Force a sync of container state with the OCI runtime. In some cases, a container's state in the runtime can become out of sync with Podman's state. This will update Podman's state based on what the OCI runtime reports. Forcibly syncing is much slower, but can resolve inconsistent state issues. .SS \fB\-\-watch\fP, \fB\-w\fP .PP Refresh the output with current containers on an interval in seconds. .SH EXAMPLES .PP .RS .nf $ podman ps \-a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 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 69ed779d8ef9f redis:alpine "redis\-server" 25 hours ago Created 6379/tcp k8s\_container1\_podsandbox1\_redhat.test.crio\_redhat\-test\-crio\_1 .fi .RE .PP .RS .nf $ podman ps \-a \-s CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE 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 69ed779d8ef9f redis:alpine "redis\-server" 25 hours ago Created 6379/tcp k8s\_container1\_podsandbox1\_redhat.test.crio\_redhat\-test\-crio\_1 27.49 MB .fi .RE .PP .RS .nf $ podman ps \-a \-\-format "{{.ID}} {{.Image}} {{.Labels}} {{.Mounts}}" 02f65160e14ca redis:alpine tier=backend proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/ 69ed779d8ef9f redis:alpine batch=no,type=small proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/ .fi .RE .PP .RS .nf $ podman ps \-\-ns \-a CONTAINER ID NAMES PID CGROUP IPC MNT NET PIDNS USER UTS 3557d882a82e3 k8s\_container2\_podsandbox1\_redhat.test.crio\_redhat\-test\-crio\_1 29910 4026531835 4026532585 4026532593 4026532508 4026532595 4026531837 4026532594 09564cdae0bec k8s\_container1\_podsandbox1\_redhat.test.crio\_redhat\-test\-crio\_1 29851 4026531835 4026532585 4026532590 4026532508 4026532592 4026531837 4026532591 a31ebbee9cee7 k8s\_podsandbox1\-redis\_podsandbox1\_redhat.test.crio\_redhat\-test\-crio\_0 29717 4026531835 4026532585 4026532587 4026532508 4026532589 4026531837 4026532588 .fi .RE .PP .RS .nf $ podman ps \-a \-\-size \-\-sort names CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 69ed779d8ef9f redis:alpine "redis\-server" 25 hours ago Created 6379/tcp k8s\_container1\_podsandbox1\_redhat.test.crio\_redhat\-test\-crio\_1 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 .fi .RE .PP .RS .nf $ podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 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 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 .fi .RE .PP .RS .nf $ podman ps \-\-external \-a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 69ed779d8ef9f redis:alpine "redis\-server" 25 hours ago Created 6379/tcp k8s\_container1\_podsandbox1\_redhat.test.crio\_redhat\-test\-crio\_1 38a8a78596f9 docker.io/library/busybox:latest buildah 2 hours ago storage busybox\-working\-container fd7b786b5c32 docker.io/library/alpine:latest buildah 2 hours ago storage alpine\-working\-container f78620804e00 scratch buildah 2 hours ago storage working\-container .fi .RE .SH ps .PP Print a list of containers .SH SEE ALSO .PP podman(1), buildah(1), crio(8) .SH HISTORY .PP August 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com \[la]mailto:umohnani@redhat.com\[ra]