magento / magento/magento-cloud-docker
Support Docker Compose v2 CLI (docker-compose vs. docker compose)
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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