mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
(feat) Check the minimum docker version (20.10) during setup and upgrade
This commit is contained in:
parent
1c16dd5f3f
commit
562a7b86e5
@ -15,6 +15,7 @@
|
||||
- Fixed all react components code according to eslint rules
|
||||
- Renamed proof-of-identity to supporting-documents in react components and in end-user strings
|
||||
- Use bat to display coloured documentation of environment variables during setup
|
||||
- Check the minimum docker version (20.10) during setup and upgrade
|
||||
- Fix a bug: when email was mapped from SSO provided as empty string -> unable to merge account
|
||||
- Fix a bug: when an empty data was retured by the SSO, unable to edit it
|
||||
- Fix a bug: user can change his group in the profile completion page, even if mapped from the SSO
|
||||
|
@ -50,7 +50,7 @@ This might work on other linux systems, and CPU architectures but this is untest
|
||||
`curl` and `bash` are needed to retrieve and run the automated deployment scripts.
|
||||
Then the various scripts will check for their own dependencies.
|
||||
|
||||
Moreover, the main software dependencies to run fab-manager are [Docker](https://docs.docker.com/engine/installation/linux/docker-ce/debian/) v20.0 or above and [Docker Compose](https://docs.docker.com/compose/install/)
|
||||
Moreover, the main software dependencies to run fab-manager are [Docker](https://docs.docker.com/engine/installation/linux/docker-ce/debian/) v20.10 or above and [Docker Compose](https://docs.docker.com/compose/install/)
|
||||
They can be easily installed using the [`prepare-vps.sleede.com` script below](#prepare-the-server).
|
||||
|
||||
<a name="setup-the-domain-name"></a>
|
||||
|
@ -54,11 +54,25 @@ system_requirements()
|
||||
echo -e "\e[91m[ ❌ ] $_command was not found, exiting...\e[39m" && exit 1
|
||||
fi
|
||||
done
|
||||
echo "detecting docker version..."
|
||||
DOCKER_VERSION=$(docker -v | grep -oP "([0-9]{1,}\.)+[0-9]{1,}")
|
||||
if verlt "$DOCKER_VERSION" 20.10; then
|
||||
echo -e "\e[91m[ ❌ ] The installed docker version ($DOCKER_VERSION) is lower than the minimum required version (20.10). Exiting...\e[39m" && exit 1
|
||||
fi
|
||||
echo "detecting docker-compose..."
|
||||
docker-compose version
|
||||
printf "\e[92m[ ✔ ] All requirements successfully checked.\e[39m \n\n"
|
||||
}
|
||||
|
||||
# compare versions utilities
|
||||
# https://stackoverflow.com/a/4024263/1039377
|
||||
verlte() {
|
||||
[ "$1" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ]
|
||||
}
|
||||
verlt() {
|
||||
[ "$1" = "$2" ] && return 1 || verlte "$1" "$2"
|
||||
}
|
||||
|
||||
docker-compose()
|
||||
{
|
||||
if ! docker compose version 1>/dev/null 2>/dev/null
|
||||
|
@ -110,6 +110,11 @@ config()
|
||||
echo -e "\e[91m[ ❌ ] docker-compose.yml was not found in ${PWD}. Please run this script from the Fab-manager's installation folder. Exiting... \e[39m"
|
||||
exit 1
|
||||
fi
|
||||
echo "Checking docker version..."
|
||||
DOCKER_VERSION=$(docker -v | grep -oP "([0-9]{1,}\.)+[0-9]{1,}")
|
||||
if verlt "$DOCKER_VERSION" 20.10; then
|
||||
echo -e "\e[91m[ ❌ ] The installed docker version ($DOCKER_VERSION) is lower than the minimum required version (20.10). Exiting...\e[39m" && exit 1
|
||||
fi
|
||||
|
||||
SERVICE="$(yq eval '.services.*.image | select(. == "sleede/fab-manager*") | path | .[-2]' docker-compose.yml)"
|
||||
YES_ALL=${Y:-false}
|
||||
|
Loading…
x
Reference in New Issue
Block a user