updated docker.sh

pull/2/head
Hari Sekhon 5 years ago
parent 2dbd7e6f4f
commit ce6e8d25cd

@ -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

Loading…
Cancel
Save