Add filter for stopped containers

and avoid "Error response from daemon: You cannot remove a running container. Stop the container before attempting removal or use -f"
This commit is contained in:
tuksik 2014-12-21 12:23:29 +02:00
parent 36b631e289
commit 24557f37f6

View file

@ -392,7 +392,7 @@ docker ps -a | grep 'weeks ago' | awk '{print $1}' | xargs docker rm
### Delete stopped containers
```
docker rm `docker ps -a -q`
docker rm `docker ps -a -q -f status=exited`
```
### Delete dangling images