-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Description:
When running the command xx run, the script tries to use the deprecated docker-compose command. This causes issues on systems where only Docker Compose V2 is installed, as the newer version uses the docker compose syntax (with a space) instead of docker-compose (with a hyphen).
Steps to Reproduce:
- Install Docker with the Docker Compose V2 plugin (docker-compose-plugin).
- Run the
xx runcommand. - Observe the error indicating that
docker-composeis not found.
Expected Behavior:
The script should use the docker compose syntax, which is the standard for Docker Compose V2.
Actual Behavior:
The script calls the docker-compose command, which is no longer available in systems using Docker Compose V2.
Suggested Solution:
- Update the code to replace docker-compose with docker compose to ensure compatibility with Docker Compose V2.
- Optionally, provide a fallback mechanism or documentation for users who might still use the older standalone docker-compose.
Workaround:
Users can create a symbolic link to map the docker-compose command to the Docker Compose V2 binary:
sudo ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose
However, this is not recommended as it’s a temporary fix and relies on user intervention.
Environment:
- Docker Version: 27.4.1
- Docker Compose Version: v2.32.1
- OS: Ubuntu 22.04
- xest.js CLI Version: 0.0.0-alpha.23
Additional Context:
Docker Compose V1 has been deprecated in favor of V2, and docker-compose is no longer installed by default. Updating the script to use docker compose ensures better compatibility and avoids reliance on deprecated commands.