-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would like to be able to execute interactive command #59
Comments
Thanks for opening @hpe-ykoehler! Could you share how this is different from the |
When I use the devcontainer exec of today to run "bash" I cannot type anything, the output shows the prompt and the container is not accepting inputs. That is normally because when using docker, to run bash we must use -ti to make the docker knows we require a TTY and tha that the session will be interactive so that it connects the stdin to the container (or someting along those line). So the test is "devcontainer exec bash" and see that you get a functional terminal, which in my setup I do not get. |
+1 to this request. There are devs I work with who don't use VSCode as their editor but would still find devcontainers useful in their workflow. An interactive shell is essential for them. In the meantime, it's possible to open a terminal session by using
|
This works OK from within a workspace directory: docker exec -it -u $(id -u) $(devcontainer up --workspace-folder . | jq -r .containerId) bash It will get the ID of a container that was previously started from the Remote - Containers VSCode extension. |
Thanks for this tip. I had to remove the
I changed to Also, this doesn't set the working directory to the workspace, you'll need to switch to the workspace directory after you get to the
|
I, too, would like a |
I would as well add that to run a bash in a devcontainer is the "standard" task, which non-vscode-users will do with a devcontainer. |
I've tried to debug this for a couple of hours today, reversing the CLI code. |
I'm looking into changing Is anyone relying on the fact that devcontainer exec currently returns a short JSON object with the “outcome” property on stdout? (We are aware that our CI action does, but that we can easily update.) |
Available with version 0.33.0 of the CLI. |
Thanks ! |
In my env, developer will likely want to run devcontainer exec bash and then be able to navigate the container and do stuff within using command-line interface.
As such, I think the option to exec the command in interactive mode is important.
The text was updated successfully, but these errors were encountered: