One method of removing unused containers is running:
docker rm $(docker ps -f status=exited -q -a)
For more information on the filtering flag see: https://docs.docker.com/reference/commandline/cli/#filtering_2
Share and learn in the Docker community.
One method of removing unused containers is running:
docker rm $(docker ps -f status=exited -q -a)
For more information on the filtering flag see: https://docs.docker.com/reference/commandline/cli/#filtering_2
we use:
which is a bit more elaborate and removes stuff that finished more that 24 hours ago, giving you a buffer of sorts.