Skip to content

docker compose fallback to the legacy docker-compose#1223

Open
veyselsahin wants to merge 3 commits into
helixml:mainfrom
veyselsahin:feature/legacy-docker-compose-fallback
Open

docker compose fallback to the legacy docker-compose#1223
veyselsahin wants to merge 3 commits into
helixml:mainfrom
veyselsahin:feature/legacy-docker-compose-fallback

Conversation

@veyselsahin

Copy link
Copy Markdown

On Ubuntu 24.04 with the docker.io package, docker compose (Compose v2
plugin) is not installed by default, but the legacy docker-compose
binary is available and works.

The current install.sh assumes that if docker compose version fails,
Compose is not installed at all, and unconditionally tries to install
the docker-compose-plugin. This can fail in two ways:

  • Ubuntu repos may not have docker-compose-plugin.
  • Adding Docker's apt repo causes docker-buildx-plugin to conflict with
    Ubuntu's docker-buildx from docker.io.

Even if the install succeeds, final user instructions always print
docker compose ..., which fails on systems that only have the legacy
binary.

Fix:

  • Introduce a sudo-aware COMPOSE_CMD that prefers $DOCKER_CMD compose
    but falls back to docker-compose if available.
  • Use $COMPOSE_CMD for the plugin check and in final instructions.

This avoids unnecessary installs, prevents package conflicts, and makes
the installer work on both Docker's official packages and Ubuntu's
docker.io defaults.

Comment thread install.sh Outdated
@lukemarsden

Copy link
Copy Markdown
Collaborator

Thanks for the PR! I left one comment

@lukemarsden lukemarsden force-pushed the main branch 2 times, most recently from 93e4998 to c07feb5 Compare December 28, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants