From efe30f1a5f96e77433259fc8ccfee0f0e3db9af2 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 16 Mar 2019 20:40:07 -0400 Subject: [PATCH] fix: correct check to see if container exists --- common-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-functions b/common-functions index adfec90..34ddc0a 100755 --- a/common-functions +++ b/common-functions @@ -280,7 +280,7 @@ service_container_rm() { local ID service_stop "$SERVICE" - ID=$(docker inspect "$SERVICE_NAME" -f '{{ .ID }}' > /dev/null 2>&1 || true) + ID=$(docker ps -a --no-trunc | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true # this may be 'true' in tests... if [[ -z "$ID" ]] || [[ "$ID" == "true" ]]; then return 0