|
@@ -1,9 +1,10 @@
|
|
|
#!/bin/bash
|
|
|
set -o errexit
|
|
|
|
|
|
-MEM=$(docker info | grep "Total Memory" | cut -d':' -f2 | xargs | sed s/GiB//)
|
|
|
-# Docker reports RAM 0.2 less than what it is actually set to
|
|
|
-(( $(echo "$MEM < 5.7" | bc -l) )) && echo "There must be at least 6GB of RAM allocated to Docker to continue." && exit
|
|
|
+MEM_BYTES=$(docker info -f '{{.MemTotal}}')
|
|
|
+MEM_MB=$(( MEM_BYTES / 1000000 ))
|
|
|
+# 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
|
|
|
source env/db.env
|