瀏覽代碼

Use previous one-line logic, exact specification of GB needed

Mark Shust 2 年之前
父節點
當前提交
927af97677
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      compose/bin/setup

+ 2 - 4
compose/bin/setup

@@ -3,10 +3,8 @@ set -o errexit
 
 
 MEM_BYTES=$(docker info -f '{{.MemTotal}}')
 MEM_BYTES=$(docker info -f '{{.MemTotal}}')
 MEM_MB=$(( MEM_BYTES / 1000000 ))
 MEM_MB=$(( MEM_BYTES / 1000000 ))
-(( MEM_MB >= 6000 )) || {
-  echo 'There must be at least 6GB of RAM allocated to Docker to continue.' >&2
-  exit 1
-}
+# When Docker Desktop is set to 6GB in the GUI, it is reported as 6227 MB
+(( MEM_MB < 6227 )) && echo "There must be at least 6GB of RAM allocated to Docker in order to continue." && exit
 
 
 # shellcheck source=../env/db.env
 # shellcheck source=../env/db.env
 source env/db.env
 source env/db.env