Add container introspection via --from option#24
Merged
Conversation
Co-authored-by: cokelaer <778821+cokelaer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add introspection feature for container
Add container introspection via Mar 5, 2026
--from option
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.
versionixhad no way to retrieve tool versions from inside a container image. This adds a--fromoption enabling introspection of Singularity/Apptainer and Docker containers.Core logic (
parser.py)_get_container_runner(container): detects container type by extension (.img/.sif) or file existence →apptainer exec/singularity exec; falls back todocker run --rmfor image names. Usesshlex.quote()to safely interpolate paths into shell commands.get_version(container=None): whencontaineris provided, builds the runner and skips the localshutil.whichcheck (the tool lives inside the container, not on the host).Versionixandsearch_registered()both acceptcontainer_runner=Noneand prepend it to all version-probe commands.CLI (
scripts.py)--fromoption (mapped tofrom_containerto avoid Python keyword collision), forwarded toget_version().Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.