Merge pull request #147 from openmaptiles/quickstart_docker_version_check_fix

[quickstart] fix docker-compose version check ( >= 1.10 )
pull/149/head
Lukas Martinelli 2017-01-20 16:45:08 +01:00 zatwierdzone przez GitHub
commit 320f0f46cc
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -51,14 +51,17 @@ echo " : Your docker system:"
docker --version
docker-compose --version
# based on: http://stackoverflow.com/questions/16989598/bash-comparing-version-numbers
function version { echo "$@" | tr -cs '0-9.' '.' | gawk -F. '{ printf("%03d%03d%03d\n", $1,$2,$3); }'; }
COMPOSE_VER=$(docker-compose version --short)
if [ $COMPOSE_VER "<" $MIN_COMPOSE_VER ]; then
if [ "$(version "$COMPOSE_VER")" -lt "$(version "$MIN_COMPOSE_VER")" ]; then
echo "ERR: Your Docker-compose version is Known to have bugs , Please Update docker-compose!"
exit 1
fi
DOCKER_VER="$(docker -v | awk -F '[ ,]+' '{ print $3 }')"
if [ $DOCKER_VER "<" $MIN_DOCKER_VER ]; then
if [ "$(version "$DOCKER_VER")" -lt "$(version "$MIN_DOCKER_VER")" ]; then
echo "ERR: Your Docker version is not compatible. Please Update docker!"
exit 1
fi