镜像,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

相关文章:

  • 2021-09-21
  • 2021-05-10
  • 2021-06-13
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2022-02-10
  • 2021-07-21
猜你喜欢
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案