From bd0bf927e1adfd283b64e08786d68028c26a6834 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Fri, 18 Mar 2022 08:34:43 -0400 Subject: [PATCH] script cleaning for docker_cleanup --- bin/docker_cleanup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/docker_cleanup b/bin/docker_cleanup index f81bb18..59cf41d 100755 --- a/bin/docker_cleanup +++ b/bin/docker_cleanup @@ -3,7 +3,7 @@ # Stop all containers if [ "$(docker ps -a -q)" ]; then echo "Stopping docker containers..." - docker stop $(docker ps -a -q) + docker stop "$(docker ps -a -q)" else echo "No running docker containers." fi @@ -11,14 +11,14 @@ fi # Remove all stopped containers if [ "$(docker ps -a -q)" ]; then echo "Removing docker containers..." - docker rm $(docker ps -a -q) + docker rm "$(docker ps -a -q)" else echo "No stopped docker containers." fi # Remove all untagged images if [[ $(docker images | grep "^") ]]; then - docker rmi $(docker images | rg "^" | awk '{print $3}') + docker rmi "$(docker images | grep "^" | awk '{print $3}')" else echo "No untagged docker images." fi