Skip to content

Commit

Permalink
Merge pull request #489 from davidalger/issue-423
Browse files Browse the repository at this point in the history
Require docker compose 2.2.3 when compose v2 is active
  • Loading branch information
davidalger committed Feb 21, 2022
2 parents 5ea2501 + 33c94bb commit 44bd17a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/warden
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ fi

## verify docker-compose meets version constraint
DOCKER_COMPOSE_REQUIRE="1.25.0"
DOCKER_COMPOSE_REQUIRE_V2="2.2.3"
DOCKER_COMPOSE_VERSION="$(docker-compose --version | grep -oE '[0-9\.]+' | head -n1)"
if ! test $(version ${DOCKER_COMPOSE_VERSION}) -ge $(version ${DOCKER_COMPOSE_REQUIRE}); then
fatal "docker-compose version should be ${DOCKER_COMPOSE_REQUIRE} or higher (${DOCKER_COMPOSE_VERSION} installed)"
fi

if test $(version ${DOCKER_COMPOSE_VERSION}) -ge $(version "2.0.0") \
&& ! test $(version ${DOCKER_COMPOSE_VERSION}) -ge $(version ${DOCKER_COMPOSE_REQUIRE_V2})
then
fatal "docker-compose version should be ${DOCKER_COMPOSE_REQUIRE_V2} or higher (${DOCKER_COMPOSE_VERSION} installed)"
fi

## define and export global shared directory paths
export readonly WARDEN_HOME_DIR="${WARDEN_HOME_DIR:-"$HOME/.warden"}"
export readonly WARDEN_SSL_DIR="${WARDEN_HOME_DIR}/ssl"
Expand Down

0 comments on commit 44bd17a

Please sign in to comment.