magento / magento/magento-cloud-docker

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

Open
#352 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request Progress: ready for grooming
Dominant language
PHP
Stars
277
Forks
187
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
[Docker Compose V2](https://docs.docker.com/compose/#compose-v2-and-the-new-docker-compose-command) 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:
- [dist/bin/magento-docker](https://github.com/magento/magento-cloud-docker/blob/develop/dist/bin/magento-docker)
- [dist/mutagen.sh](https://github.com/magento/magento-cloud-docker/blob/develop/dist/mutagen.sh)
- [tests/functional/Robo/Tasks folder](https://github.com/magento/magento-cloud-docker/tree/develop/tests/functional/Robo/Tasks)

**Additional context**
None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting dist/bin/magento-docker and dist/mutagen.sh for Docker Compose command usage, then review related tasks in tests/functional/Robo/Tasks. Verify how the existing commands are invoked and test the V1 and V2 command forms; done means both docker-compose and docker compose are supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.