Skip to content

Instantly share code, notes, and snippets.

Francisco Ruiz franciscoruiz

Block or report user

Report or block franciscoruiz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
franciscoruiz /
Created Nov 24, 2017
Utility to remove all containers in certain status
# docker-rm-in-status (exited|created|running)
docker-rm-in-status ()
local status="${1:-exited}";
matching_containers=$(docker ps -aq --filter status="${status}");
if [[ -z "${matching_containers}" ]]; then
echo "No matching containers";
echo "Removing containers";
docker rm --volumes --force ${matching_containers};
You can’t perform that action at this time.