Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require docker compose 2.2.3 when compose v2 is active #489

Merged
merged 1 commit into from
Feb 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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