Fix #35: use docker compose plugin (v2) with fallback to docker-compose#87
Open
ClaydeCode wants to merge 1 commit into
Open
Fix #35: use docker compose plugin (v2) with fallback to docker-compose#87ClaydeCode wants to merge 1 commit into
ClaydeCode wants to merge 1 commit into
Conversation
Detect the compose command once at startup: prefer the plugin form
("docker compose") via "docker compose version", fall back to the
standalone "docker-compose" binary when the plugin is unavailable.
- shard_core/util/subprocess.py: add compose_command() with lru_cache detection
- shard_core/service/app_tools.py: replace all hard-coded "docker-compose" calls
- Dockerfile: drop standalone docker-compose APT package; Docker install provides the plugin
- .github/workflows/test.yml: remove KengoTODA action; runner's built-in plugin is used
- tests/test_compose_command.py: unit tests for detection and caching behaviour
Co-Authored-By: Claude Sonnet 4.6 <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
compose_command()helper inshard_core/util/subprocess.pythat detects once (vialru_cache) whether the Docker Compose v2 plugin is available (docker compose version), preferring("docker", "compose")and falling back to("docker-compose",)."docker-compose"invocations inshard_core/service/app_tools.pywith*compose_command().Dockerfileto drop the standalonedocker-composeAPT package; theget.docker.cominstall script already ships the compose plugin..github/workflows/test.ymlto remove theKengoTODA/actions-setup-docker-composestep — GitHub Actionsubuntu-latestrunners include Docker 24+ with the compose plugin built in.tests/test_compose_command.pywith unit tests covering plugin-present, plugin-absent (non-zero exit,FileNotFoundError,TimeoutExpired), and caching behaviour.Closes #35
Recommended reading order
shard_core/util/subprocess.py— newcompose_command()/_detect_compose_command()shard_core/service/app_tools.py— call-site updatesDockerfile— package list change.github/workflows/test.yml— CI step removaltests/test_compose_command.py— unit tests🤖 Generated with Claude Code