mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-23 02:04:46 +02:00
scripts: adding docker version check to align to docs (24.X)
This commit is contained in:
parent
e398cb91e9
commit
926af87cfb
@ -25,6 +25,16 @@ for bin in openssl curl docker git awk sha1sum grep cut; do
|
|||||||
if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi
|
if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Check Docker Version (need at least 24.X)
|
||||||
|
docker_version=$(docker -v | grep -oP '\d+\.\d+\.\d+' | cut -d '.' -f 1)
|
||||||
|
|
||||||
|
if [[ $docker_version -lt 24 ]]; then
|
||||||
|
echo -e "\e[31mCannot find Docker with a Version higher or equals 24.0.0\e[0m"
|
||||||
|
echo -e "\e[33mmailcow needs a newer Docker version to work properly...\e[0m"
|
||||||
|
echo -e "\e[31mPlease update your Docker installation... exiting\e[0m"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if docker compose > /dev/null 2>&1; then
|
if docker compose > /dev/null 2>&1; then
|
||||||
if docker compose version --short | grep -e "^2." -e "^v2." > /dev/null 2>&1; then
|
if docker compose version --short | grep -e "^2." -e "^v2." > /dev/null 2>&1; then
|
||||||
COMPOSE_VERSION=native
|
COMPOSE_VERSION=native
|
||||||
|
10
update.sh
10
update.sh
@ -328,6 +328,16 @@ for bin in curl docker git awk sha1sum grep cut; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Check Docker Version (need at least 24.X)
|
||||||
|
docker_version=$(docker -v | grep -oP '\d+\.\d+\.\d+' | cut -d '.' -f 1)
|
||||||
|
|
||||||
|
if [[ $docker_version -lt 24 ]]; then
|
||||||
|
echo -e "\e[31mCannot find Docker with a Version higher or equals 24.0.0\e[0m"
|
||||||
|
echo -e "\e[33mmailcow needs a newer Docker version to work properly... continuing on your own risk!\e[0m"
|
||||||
|
echo -e "\e[31mPlease update your Docker installation... exiting\e[0m"
|
||||||
|
sleep 10
|
||||||
|
fi
|
||||||
|
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
DATE=$(date +%Y-%m-%d_%H_%M_%S)
|
DATE=$(date +%Y-%m-%d_%H_%M_%S)
|
||||||
BRANCH=$(cd ${SCRIPT_DIR}; git rev-parse --abbrev-ref HEAD)
|
BRANCH=$(cd ${SCRIPT_DIR}; git rev-parse --abbrev-ref HEAD)
|
||||||
|
Loading…
Reference in New Issue
Block a user