Closed dhia-gharsallaoui closed 3 months ago
After a discussion in chat, we agreed on the following:
--entrypoint
definition is not correct in the context of the enhancement.--exec
flag that will override current command
definition in action.yaml
--entrypoint
to override container definition.Usage example:
launchr my.container.action --exec -- /bin/bash -c "ls -al"
launchr my.container.action --entrypoint="ls" --exec -- -al
launchr my.container.action --entrypoint="" --exec -- /bin/bash -c "ls -al"
The command may be used without --
if no flags are provided.
Here, it's important to have --
to make sure that -c
flag is not parsed as a flag of launchr.
Ref: https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
Note: it's not possible to define --entrypoint="/bin/bash -c"
, as it must be a path to an executable without flags.
Description:
Introduce a
--entrypoint
option in relevant commands, mirroring existing action commands. This enhancement allows users to customize Docker container entrypoints while preserving CLI-generated environment settings and mounts.Issue Description: Implement --entrypoint Option for Customized Container Execution
Benefits:
Flexibility: Tailor container execution with a user-specified entrypoint.
Consistency: Aligns with current CLI behavior for a seamless user experience.
Environment Preservation: Maintains continuity by keeping the same environment settings and mounts.
Implementation:
Modify commands to support the
--entrypoint
option, adapting container execution logic.