odo icon indicating copy to clipboard operation
odo copied to clipboard

command for opening terminal in a container `odo terminal`

Open kadel opened this issue 2 years ago • 6 comments

/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 terminal command should automatically open bash/sh in the container where the application is currently running
  • [ ] odo terminal --container mycontainer should open terminal to a container named mycontainer
  • [ ] if there are multiple containers and the user doesn't specify one with --container flag odo should error out and list all container names and tell the user to specify one.

kadel avatar Apr 12 '23 11:04 kadel

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 for odo run)
  • --container is 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 workingDir is /projects):
- exec:
    commandLine: bash
    component: runtime
    workingDir: ${PROJECT_SOURCE}
  id: connect

rm3l avatar Jul 06 '23 13:07 rm3l

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

github-actions[bot] avatar Oct 05 '23 00:10 github-actions[bot]

/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.

rm3l avatar Oct 05 '23 07:10 rm3l

Would really like this feature! commenting for visibility.

AgentK9 avatar Oct 18 '23 18:10 AgentK9

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)

AgentK9 avatar Oct 18 '23 18:10 AgentK9

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

github-actions[bot] avatar Jan 17 '24 00:01 github-actions[bot]