Skip to content

feat: add container manager detection for tools#195

Open
thiernodialloAFA wants to merge 4 commits into
green-code-initiative:mainfrom
thiernodialloAFA:feature/add_container_detection
Open

feat: add container manager detection for tools#195
thiernodialloAFA wants to merge 4 commits into
green-code-initiative:mainfrom
thiernodialloAFA:feature/add_container_detection

Conversation

@thiernodialloAFA
Copy link
Copy Markdown

@thiernodialloAFA thiernodialloAFA commented May 20, 2026

ajout de la detection automatique du container manager installé sur la machine

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh to 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 $COMPOSE command instead of hard-coding docker-compose.
  • Improves tool_start_withtoken.sh by requiring SONAR_TOKEN to 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.

Comment thread tool_lib_container.sh
Comment thread tool_lib_container.sh
Comment thread tool_lib_container.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants