Browse Source

fix: [docker-host] soften constraint on ``docker-compose`` exact version string

We had the build number changing from ``a133471`` to ``unknown``.
postgres
Valentin Lab 6 years ago
parent
commit
db24b6a301
  1. 7
      precise/host/hooks/install.d/70-0k.sh

7
precise/host/hooks/install.d/70-0k.sh

@ -176,16 +176,17 @@ sysctl -w net.ipv4.ip_forward=1
if type -p docker-compose >/dev/null; then
#echo "Found docker-compose..." >&2
if ! docker-compose --version >/dev/null 2>&1; then
if ! CURRENT_VERSION_TEXT="$(docker-compose --version 2>/dev/null)"; then
echo "'docker-compose' failed ! Please check your docker-compose binary."
echo "Failed install."
docker-compose --version
exit 1
fi
VALID_VERSION_TEXT="docker-compose version 1.21.2, build a133471"
if [ "$(docker-compose --version)" != "$VALID_VERSION_TEXT" ]; then
VALID_VERSION_TEXT="docker-compose version 1.21.2, build "
if ! [[ "$CURRENT_VERSION_TEXT" == "$VALID_VERSION_TEXT"* ]]; then
echo "Invalid version of docker-compose: we need exactly:"
echo "version text: $VALID_VERSION_TEXT"
echo "current version: $CURRENT_VERSION_TEXT"
echo "Failed install."
exit 1
fi

Loading…
Cancel
Save