我已经使用以下命令安装了 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
- 码头工人版本:码头工人版本1.6.2,构建 7c8fca2
-谢谢