From f26a636634bed19ae4bf64f3c9de145d879859a8 Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Mon, 12 Aug 2024 07:06:12 -0600 Subject: [PATCH] Support docker compose fallback for older docker versions that do not have the compose plugin --- pkg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg b/pkg index 01fbaf5dd3..37a817abbd 100755 --- a/pkg +++ b/pkg @@ -33,7 +33,7 @@ fi # Check to see if docker compose is already installed and use it directly, if possible. if [ ${#COMPOSECMD[@]} -eq 0 ]; then - if which docker compose >/dev/null 2>&1; then + if docker compose >/dev/null 2>&1; then COMPOSECMD=( docker compose ) fi fi @@ -42,7 +42,7 @@ fi # This is considerably slower, but allows for building on hosts without docker-compose. if [ ${#COMPOSECMD[@]} -eq 0 ]; then # Pin the version of docker-compose. - IMAGE="docker/compose:1.11.2" + IMAGE="docker:latest" # We need to either mount the docker socket or export the docker host into the container. # This allows the container to manage "sibling" containers via docker. @@ -80,7 +80,7 @@ if [ ${#COMPOSECMD[@]} -eq 0 ]; then # COMPOSECMD is kept as an array to significantly simplify handling paths that contain # spaces and other special characters. - COMPOSECMD=(docker run --rm "${DOCKER_ADDR[@]}" $COMPOSE_OPTIONS "${VOLUMES[@]}" -w "$(pwd)" $IMAGE) + COMPOSECMD=(docker run --rm "${DOCKER_ADDR[@]}" $COMPOSE_OPTIONS "${VOLUMES[@]}" -w "$(pwd)" $IMAGE docker compose) fi # Parse command line arguments