Use '[engine]-compose' command instead of '[engine] compose' for compatibility with old installation
This commit is contained in:
parent
675bb089d8
commit
efe3258bd4
1 changed files with 5 additions and 2 deletions
|
@ -147,7 +147,10 @@ CHECKED_CONTAINERS=( )
|
||||||
debug "List running containers..."
|
debug "List running containers..."
|
||||||
if [ -n "$DOCKERCOMPOSE_FILE" ]
|
if [ -n "$DOCKERCOMPOSE_FILE" ]
|
||||||
then
|
then
|
||||||
RUNNING_CONTAINERS=$($ENGINE compose -f $DOCKERCOMPOSE_FILE ps --format '{{.Service}}' | tr '\n' ' ')
|
which "${ENGINE}-compose" > /dev/null 2>&1 \
|
||||||
|
&& COMPOSE_BIN="${ENGINE}-compose" \
|
||||||
|
|| COMPOSE_BIN="$ENGINE compose"
|
||||||
|
RUNNING_CONTAINERS=$($COMPOSE_BIN -f $DOCKERCOMPOSE_FILE ps --format '{{.Service}}' | tr '\n' ' ')
|
||||||
else
|
else
|
||||||
RUNNING_CONTAINERS=$($ENGINE ps --format '{{.Names}}' | tr '\n' ' ')
|
RUNNING_CONTAINERS=$($ENGINE ps --format '{{.Names}}' | tr '\n' ' ')
|
||||||
fi
|
fi
|
||||||
|
@ -158,7 +161,7 @@ function exec_in_container() {
|
||||||
shift;
|
shift;
|
||||||
if [ -n "$DOCKERCOMPOSE_FILE" ]
|
if [ -n "$DOCKERCOMPOSE_FILE" ]
|
||||||
then
|
then
|
||||||
$ENGINE compose -f $DOCKERCOMPOSE_FILE exec $container $@
|
$COMPOSE_BIN -f $DOCKERCOMPOSE_FILE exec $container $@
|
||||||
return $?
|
return $?
|
||||||
fi
|
fi
|
||||||
$ENGINE exec $container $@
|
$ENGINE exec $container $@
|
||||||
|
|
Loading…
Reference in a new issue