【发布时间】:2016-11-12 21:59:27
【问题描述】:
我已经使用以下命令安装了 docker:
sudo apt-get install docker.io
出于测试目的,我使用
在分离模式下运行 Ubuntu 映像sudo docker run -d -it Ubuntu
但是当我尝试像执行 docker ps 命令时
sudo docker ps --format
我遇到了一些错误。根据错误,未定义标志 --format 。以下是错误信息。
flag provided but not defined: --format
See 'docker ps --help'.
当我查看帮助页面时,我发现了这个
Usage: docker ps [OPTIONS]
List containers
-a, --all=false Show all containers (default shows just running)
--before= Show only container created before Id or Name
-f, --filter=[] Filter output based on conditions provided
--help=false Print usage
-l, --latest=false Show the latest created container, include non-running
-n=-1 Show n last created containers, include non-running
--no-trunc=false Don't truncate output
-q, --quiet=false Only display numeric IDs
-s, --size=false Display total file sizes
--since= Show created since Id or Name, include non-running
根据帮助页面,没有定义标志--format。 但根据参考文献 https://docs.docker.com/engine/reference/commandline/ps/ ,我应该可以运行带有 --format 标志的命令。
可能是什么原因?
补充信息
- 操作系统:Ubuntu 14.04
- docker 版本:Docker 版本 1.6.2,构建 7c8fca2
-谢谢
【问题讨论】: