feat: use is_container_status everywhere

This commit is contained in:
Jose Diaz-Gonzalez
2018-02-12 02:21:34 -05:00
parent 7a6d771689
commit a8d42ea8be
3 changed files with 7 additions and 6 deletions

View File

@@ -347,8 +347,7 @@ get_app_running_container_ids() {
CIDS=$(get_app_container_ids "$APP" "$CONTAINER_TYPE")
for CID in $CIDS; do
local APP_CONTAINER_STATUS=$(docker inspect -f '{{.State.Running}}' "$CID" 2>/dev/null || true)
[[ "$APP_CONTAINER_STATUS" == "true" ]] && local APP_RUNNING_CONTAINER_IDS+="$CID "
(is_container_status "$CID" "Running") && local APP_RUNNING_CONTAINER_IDS+="$CID "
done
echo "$APP_RUNNING_CONTAINER_IDS"