Pages

Tuesday, September 16, 2014

Remove non-running Docker containers

$ $ docker rm `(docker ps -q && docker ps -qa) | sort | uniq -u`

Applies 'docker rm' to all container IDs that appear in 'docker ps -a' but not in 'docker ps' - i.e. the ones that are not running.




commandlinefu.com


by David Winterbottom (codeinthehole.com)






from All commands http://ift.tt/1sgLEpZ

No comments:

Post a Comment