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