List only stopped Docker containers

前端 未结 3 1165
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-29 21:10

Docker gives you a way of listing running containers or all containers including stopped ones.

This can be done by:

$ docker ps # To list running contain         


        
3条回答
  •  误落风尘
    2021-01-29 21:17

    Only stopped containers can be listed using:

    docker ps --filter "status=exited"
    

    or

    docker ps -f "status=exited"
    

提交回复
热议问题