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 |
| | Show all containers (default shows just running) |
| | Filter output based on conditions provided |
| | Pretty-print containers using a Go template |
| | Show n last created containers (includes all states) |
| | Show the latest created container (includes all states) |
| | Don’t truncate output |
| | Only display numeric IDs |
| | Display total file sizes |