From 7a68f1ad2c6ff75204d2728a429515ba913e2eaf Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Wed, 27 Apr 2022 09:46:25 -0300 Subject: [PATCH] Update prereqs to include bc command --- Dockerfile | 2 +- check_full_pvs.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c581848..aa819c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM bitnami/kubectl:1.22 USER root RUN apt-get update && \ - apt-get install -y git && \ + apt-get install -y git bc && \ rm -r /var/lib/apt/lists /var/cache/apt/archives RUN mkdir -p /tmp/krew && chown 1001 /tmp/krew diff --git a/check_full_pvs.sh b/check_full_pvs.sh index 7cf0fe8..97dba2a 100755 --- a/check_full_pvs.sh +++ b/check_full_pvs.sh @@ -21,7 +21,10 @@ checkReqs () { echo "ERROR: df-pv kubectl plugin is required for this script to run. First install krew, then install df-pv plugin." exit fi - + if [ ! -x "$(command -v "bc")" ]; then + echo "ERROR: bc command (precision calculator) is required for this script to run." + exit + fi } scaleworkload () {