From ce6e8d25cd26a4022d0125e7a79ab66c23575b26 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Thu, 8 Aug 2019 18:07:36 +0100 Subject: [PATCH] updated docker.sh --- .bash.d/docker.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.bash.d/docker.sh b/.bash.d/docker.sh index 46d4287b..b6ade735 100644 --- a/.bash.d/docker.sh +++ b/.bash.d/docker.sh @@ -25,6 +25,8 @@ alias dockerr=dockerrunrm alias dockere=dockerexec alias de=dockere +alias dockerrma=dockerrmall + # wipe out dangling image layers #alias dockerrmi='docker rmi $(docker images -q --filter dangling=true)' dockerrmi(){ @@ -80,17 +82,6 @@ docker_get_container_ids(){ awk '{print $1}' } -dockerrma(){ - # would use xargs -r / --no-run-if-empty but that is GNU only, doesn't work on Mac - local ids - ids="$(docker_get_container_ids)" - if [ -n "$ids" ]; then - docker rm -f "$@" - # shellcheck disable=SC2086 - docker rm $ids - fi -} - dockerrmall(){ # would use xargs -r / --no-run-if-empty but that is GNU only, doesn't work on Mac local ids