Skip to content

Support Docker Compose v2 CLI (docker-compose vs. docker compose) #352

Open
@rangerz

Description

@rangerz

Is your feature request related to a problem? Please describe.
Docker Compose V2 use the new docker compose command, and the old is docker-compose

Describe the solution you'd like
Should support V1 and V2

Describe alternatives you've considered
Try to detect and use the correct command

# Support Compose V2
if docker compose version > /dev/null 2>&1; then
  DOCKER_COMPOSE="docker compose"
else
  DOCKER_COMPOSE="docker-compose"
fi
$DOCKER_COMPOSE --help

Related files:

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Ready for Grooming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions