feat: add container manager detection for tools#195
Open
thiernodialloAFA wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an auto-detection layer for the local container engine/compose runtime (Docker Desktop, Rancher Desktop, OrbStack, Colima, Podman, nerdctl, Finch) and updates the existing dev helper scripts to use it when starting/stopping the SonarQube stack.
Changes:
- Introduces
tool_lib_container.shto detect a usable container engine and compose command, with optional auto-start and override env vars. - Updates tool scripts to source the library and invoke the resolved
$COMPOSEcommand instead of hard-codingdocker-compose. - Improves
tool_start_withtoken.shby requiringSONAR_TOKENto be provided via environment variable (and printing a clearer error when missing).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tool_lib_container.sh | New runtime detection + optional daemon auto-start logic; exports COMPOSE, CONTAINER_ENGINE, CONTAINER_PRODUCT. |
| tool_docker-init.sh | Uses detected compose runtime to build and start the stack. |
| tool_docker-clean.sh | Uses detected compose runtime to tear down the stack and volumes. |
| tool_docker-logs.sh | Uses detected compose runtime to tail logs (optionally scoped to services). |
| tool_start.sh | Uses detected compose runtime to start already-created services. |
| tool_stop.sh | Uses detected compose runtime to stop services without removing resources. |
| tool_start_withtoken.sh | Requires SONAR_TOKEN env var and starts the stack with it passed through to compose. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
ajout de la detection automatique du container manager installé sur la machine