fix: docker version check

This commit is contained in:
MontyDev 2024-10-22 21:30:15 +01:00 committed by GitHub
parent 8daa05bab2
commit eb8ac56cf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,12 +7,11 @@ if [ -z "$DOCKER_VER" ]; then
echo "Docker not found; install it: https://docs.docker.com/engine/install/" echo "Docker not found; install it: https://docs.docker.com/engine/install/"
exit 1 exit 1
fi fi
if [ "$(echo "$DOCKER_VER"| cut -d'.' -f 1)" -ge 19 ] && \ MIN_DOCKER_VER=19.0.3
[ "$(echo "$DOCKER_VER"| cut -d'.' -f 2)" -ge 0 ] && \ if { echo "$MIN_DOCKER_VER"; echo "$DOCKER_VER"; } | sort --version-sort --check=quiet; then
[ "$(echo "$DOCKER_VER"| cut -d'.' -f 3)" -ge 3 ]; then
echo "Docker Found; OK" echo "Docker Found; OK"
else else
echo "Docker version less than 19.0.3; upgrade it: https://docs.docker.com/engine/install/" echo "Docker version less than $MIN_DOCKER_VER; upgrade it: https://docs.docker.com/engine/install/"
exit 1 exit 1
fi fi
docker compose version 2>&1 > /dev/null docker compose version 2>&1 > /dev/null