Docker Command

docker ps : 列出容器

语法

docker ps [OPTIONS]

OPTIONS说明:

  • -a :显示所有的容器,包括未运行的。

  • -f :根据条件过滤显示的内容。

  • --format :指定返回值的模板文件。

  • -l :显示最近创建的容器。

  • -n :列出最近创建的n个容器。

  • --no-trunc :不截断输出。

  • -q :静默模式,只显示容器编号。

  • -s :显示总的文件大小。

docker ps

Description

List containers

Usage

docker ps [OPTIONS]

For example uses of this command, refer to the examples section below.

Options

Name, shorthand Default Description
--all , -a   Show all containers (default shows just running)
--filter , -f   Filter output based on conditions provided
--format   Pretty-print containers using a Go template
--last , -n -1 Show n last created containers (includes all states)
--latest , -l   Show the latest created container (includes all states)
--no-trunc   Don’t truncate output
--quiet , -q   Only display numeric IDs
--size , -s   Display total file sizes






















原文地址:https://www.cnblogs.com/softidea/p/12834551.html