Docker - ps (List containers)

Card Puncher Data Processing

About

The docker ps command queries the Docker daemon for information about all the containers it knows about.

Syntax

docker ps [OPTIONS]

List containers

Options:
  -a, --all             Show all containers (default shows just running)
  -f, --filter value    Filter output based on conditions provided (default [])
      --format string   Pretty-print containers using a Go template
      --help            Print usage
  -n, --last int        Show n last created containers (includes all states) (default -1)
  -l, --latest          Show the latest created container (includes all states)
      --no-trunc        Don't truncate output
  -q, --quiet           Only display numeric IDs
  -s, --size            Display total file sizes

Example

docker ps -a

where:

  • a let you see stopped container
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
3e3a1ac2c76e        ubuntu              "/bin/sh -c 'while tr"   39 seconds ago      Up 39 seconds                           jolly_panini

where:





Discover More
Docker For Windows Switch Container Type
Docker - Containers

in Docker. A container is a running instance of an image. Docker containers only run as long as the command you specify is active. A container ID uniquely identifies a container. A container...
Card Puncher Data Processing
Docker - docker client

The CLI uses the Docker REST API to control or interact with the Docker daemon where subcommand is: attach - Attach to a running container build - Build an image from a Dockerfile commit - Create...



Share this page:
Follow us:
Task Runner