Skip to content

Commit 1e46792

Browse files
committed
add 4 cores and 6 GB Ram min requirements
Signed-off-by: Tarun Pothulapati <[email protected]>
1 parent 64a05b0 commit 1e46792

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

entrypoint.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
set -eux -o pipefile
44

5+
# check for minimum requirements
6+
REQUIRED_MEM_KB=$((6 * 1024 * 1024))
7+
total_mem_kb=$(cat /proc/meminfo | awk '/MemTotal:/ {print $2}')
8+
if [ $total_mem_kb -lt $((REQUIRED_MEM_KB)) ]; then
9+
printf "Preview installation of Gitpod requires a system with at least 6GB of memory\n"
10+
exit 1
11+
fi
12+
13+
REQUIRED_CORES=4
14+
total_cores=$(nproc)
15+
if [ $total_cores -lt $((REQUIRED_CORES)) ]; then
16+
printf "Preview installation of Gitpod requires a system with at least 4 CPU Cores\n"
17+
exit 1
18+
fi
19+
520
# Get container's IP address
621
NODE_IP=$(hostname -i)
722
DOMAIN_STRING=${NODE_IP//[.]/-}

0 commit comments

Comments
 (0)