#!/bin/bash CONTAINERS=`docker ps -a -q` if [[ -z "$CONTAINERS" ]]; then echo "No containers to cleanup, exit now." exit 0 fi docker rm $@ $CONTAINERS