From 7079f9defc82e02ded15d3c2f2fcddb87981e742 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Wed, 30 Aug 2017 10:53:47 +0100 Subject: [PATCH] reverse elif and if for cpu cores --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7248725..4049fcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -114,10 +114,10 @@ RUN set -ex && \ # as one less than actual available, if 6 or more set to two less than available, otherwise use all cores RUN \ CPU_CORES=$(cat /proc/cpuinfo | grep processor | wc -l) && \ - if [ $CPU_CORES -gt 3 ]; then \ - CPU_CORES=$(expr $CPU_CORES - 1); \ - elif [ $CPU_CORES -gt 5 ]; then \ + if [ $CPU_CORES -gt 5 ]; then \ CPU_CORES=$(expr $CPU_CORES - 2); \ + elif [ $CPU_CORES -gt 3 ]; then \ + CPU_CORES=$(expr $CPU_CORES - 1); \ fi && \ echo $CPU_CORES > /tmp/cpu-cores