
正文
docker 查看容器信息---格式化
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
镜像,ID,端口号,状态
docker ps -a --format "table {{.Image}}\t{{.ID}}\t{{.Ports}}\t{{.Status}}"
列出正在运行的容器
docker ps -a -f "status=running"
列出已经退出的容器
docker ps -a -f "status=exited"
status 所有的状态
-
status (
created|restarting|running|removing|paused|exited|dead)
参考:https://docs.docker-cn.com/engine/reference/commandline/ps/#show-both-running-and-stopped-containers






![【电子书】[职业技术] 《Docker全攻略》[张涛][epub+mobi+azw3] 【电子书】[职业技术] 《Docker全攻略》[张涛][epub+mobi+azw3]](https://www.04ip.com/template/qe/style/noimg/9.jpg)
![【电子书】[职业技术] 《Docker生产环境实践指南》[美][Joe Johnston][epub+mobi+azw3] 【电子书】[职业技术] 《Docker生产环境实践指南》[美][Joe Johnston][epub+mobi+azw3]](https://www.04ip.com/template/qe/style/noimg/6.jpg)