fix: detect docker compose availability in cluster script#365
Open
austinylin wants to merge 2 commits intoJackHopkins:mainfrom
Open
fix: detect docker compose availability in cluster script#365austinylin wants to merge 2 commits intoJackHopkins:mainfrom
austinylin wants to merge 2 commits intoJackHopkins:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fle/cluster/run-envs.shassumed anydockerinstall implied a workingdocker compose. On setups without the Compose plugin (e.g. Colima + Homebrewdockerwithoutdocker-compose),fle cluster startwould fall through todocker -f docker-compose.yml up -dand fail with the misleadingunknown shorthand flag: 'f' in -f.dockerfirst (preserving the original "Docker not found" error), then verifiesdocker compose versionactually works, and falls back to the standalonedocker-composebinary if present — mirroring the detection already infle/cluster/run_envs.py:43-55.Test plan
bash -n fle/cluster/run-envs.shpassesfle cluster startpulls the image and brings up the container as expecteddocker-compose(plugin returns non-zero),setup_compose_cmdselectsCOMPOSE_CMD=docker-composeand exits 0docker, fails withError: Docker not found. Please install Docker.and exits 1dockerbut no compose (plugin or standalone), fails withError: Docker Compose not found. Please install Docker Compose.and exits 1🤖 Generated with Claude Code