Skip to content

fix: detect docker compose availability in cluster script#365

Open
austinylin wants to merge 2 commits intoJackHopkins:mainfrom
austinylin:fix/compose-detection-in-cluster-script
Open

fix: detect docker compose availability in cluster script#365
austinylin wants to merge 2 commits intoJackHopkins:mainfrom
austinylin:fix/compose-detection-in-cluster-script

Conversation

@austinylin
Copy link
Copy Markdown

@austinylin austinylin commented Apr 22, 2026

Summary

  • fle/cluster/run-envs.sh assumed any docker install implied a working docker compose. On setups without the Compose plugin (e.g. Colima + Homebrew docker without docker-compose), fle cluster start would fall through to docker -f docker-compose.yml up -d and fail with the misleading unknown shorthand flag: 'f' in -f.
  • Now checks for docker first (preserving the original "Docker not found" error), then verifies docker compose version actually works, and falls back to the standalone docker-compose binary if present — mirroring the detection already in fle/cluster/run_envs.py:43-55.

Test plan

  • bash -n fle/cluster/run-envs.sh passes
  • On a machine with the Compose plugin installed, fle cluster start pulls the image and brings up the container as expected
  • On a mocked env with only standalone docker-compose (plugin returns non-zero), setup_compose_cmd selects COMPOSE_CMD=docker-compose and exits 0
  • On a mocked env with no docker, fails with Error: Docker not found. Please install Docker. and exits 1
  • On a mocked env with docker but no compose (plugin or standalone), fails with Error: Docker Compose not found. Please install Docker Compose. and exits 1

🤖 Generated with Claude Code

austinylin and others added 2 commits April 21, 2026 20:34
The cluster shell script assumed that if the `docker` CLI was present,
`docker compose` would work too. On setups where Docker is installed
without the Compose plugin (e.g. Colima + Homebrew `docker` without
`docker-compose`), `fle cluster start` failed with a confusing
"unknown shorthand flag: 'f' in -f" error because the generated command
expanded to `docker -f docker-compose.yml ...`.

Actually verify `docker compose version` works, and fall back to the
standalone `docker-compose` binary if available — mirroring the logic
already in `run_envs.py`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Give a clear "Docker not found" error when `docker` itself is missing,
rather than blaming Compose. Also drop the Docker Desktop mention from
the fallback error — plenty of valid ways to install Compose.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant