command for opening terminal in a container `odo terminal`
/kind user-story
User Story
As an odo user, I want to be able to open a terminal in the container with my application So that I can run commands in the container and debug application.
Acceptance Criteria
- [ ]
odo terminalcommand should automatically open bash/sh in the container where the application is currently running - [ ]
odo terminal --container mycontainershould open terminal to a container namedmycontainer - [ ] if there are multiple containers and the user doesn't specify one with
--containerflag odo should error out and list all container names and tell the user to specify one.
Grooming (Jul 6, 2023)
- The shell (bash, sh, ...) should be a flag, defaulting to bash
-
-it(input / TTY) should be set automatically for the moment (as it is for now forodo run) -
--containeris the name of the container component in the Devfile - Dynamically create a new exec command in the Devfile in memory with the shell command executed (default value for
workingDiris/projects):
- exec:
commandLine: bash
component: runtime
workingDir: ${PROJECT_SOURCE}
id: connect
A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.
/remove-lifecycle stale /priority Medium
Still relevant, and bumping priority to Medium because it came as a feature request following a recent talk at a local meetup.
Would really like this feature! commenting for visibility.
Another idea: have an option that allows certain commands to result in an interactive shell instead of just exiting (use case would be something like odo run python which would drop you into the python shell in your container)
A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.