Fix issue #2184: Enable Ptyxis to use toolbox(1) to enter containers#1785
Fix issue #2184: Enable Ptyxis to use toolbox(1) to enter containers#1785cschalle wants to merge 5 commits intocontainers:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request enhances the 'toolbox run' command by adding the '--env', '--workdir', and '--use-fallback-shell' options. These additions allow users to set environment variables, specify an absolute working directory, and fall back to standard shells if a command is missing within the container. The PR includes necessary updates to the man pages, command logic, and system tests. I have no feedback to provide.
|
Build failed. ✔️ unit-test SUCCESS in 2m 14s |
Fixes #2184
Summary
Added --env, --use-fallback-shell, and --workdir flags to toolbox run command
Added three new options to the toolbox run command to enable Ptyxis to use toolbox(1) instead of directly invoking podman exec:
--env KEY=VALUE: Repeatable flag to pass environment variables into the container exec session. Uses StringArrayVar to avoid splitting on commas.
--use-fallback-shell: Boolean flag that enables fallback-to-bash behavior (trying /bin/bash -l, then /bin/sh -l) when the specified command is not found. Also added /bin/sh -l as a second entry in runFallbackCommands.
--workdir DIR: String flag to override the working directory used inside the container. Validates that the value is an absolute path.
Files modified:
References
Test Results
Generated using Claude AI by Maintainer Buddy