-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Allow dokku run to support interactive commands #236
Comments
resolves #236, adding support for dokku run commands to be interactive
The ProblemI would like to reopen this ticket since the change broke the run command for locally executed commands. The current line 19 of
The
If, logged into the server through ssh, I run:
Nothing is printed. However, if I change line 19 to:
or even:
or even:
and re-run a command, I get:
rajivm did not have this issue since he's calling
which then returns output but requires a final Ctrl-C to quit ssh. The problem is that docker's Proposed SolutionOne way to resolve this, while retaining the ability to run interactive commands, is to remove the
This enables both local and remote execution of commands. The drawback is that remote execution of |
@mikexstudios Can you send a PR for removing the Thinking if we can detect that we have to allocate a pseudo-tty so it can work for both versions. :) |
I think the issue has to do with how pluginhook is running the plugin "run" command: While with -i -t
fails when running directly on the server... running the shell script:
does not... and, similarly, if I make "commands" executable,
does not fail also. So then I tried inlining the "run" plugin into the main "dokku" script, and again it worked fine (both locally and remotely over ssh). Still investigating... |
rajivm is right. I will hold off on sending a pull request until the root issue can be uncovered. I'll see if I can figure anything out too. |
pluginhook also causes "ls" and similar commands not to auto-terminate when running remotely; however, without pluginhook, the command runs and then ssh disconnects. |
is false when running from pluginhook, versus when running from a normal shell script... this means the output stream is no longer attached to a tty. |
Let's see if @progrium has any pointers. :) ping! |
Quick update: It seems that in https://github.com/progrium/pluginhook/blob/master/pluginhook.go, |
What happens if you try the following with the 'original' pluginhook?
|
@asm89 that also returns nothing (using the original pluginhook). |
allows |
Until we can resolve the issue with pluginhook-- one temporary solution that we could merge in (and not close the ticket with) is to just inline the "run" plugin into the main dokku script. After we figure this out, we could move it back to the plugin. This would create the "least broken" experience for users in the meantime. |
Super interested in fixing pluginhook once we know what we want. On Mon, Oct 14, 2013 at 9:09 PM, Rajiv Makhijani
Jeff Lindsay |
Hey Jeff, pluginhook seems to have a major issue that is preventing interactive execution of commands through dokku:
A second minor issue is:
Can you investigate why pluginhook is behaving this way? Essentially, we want pluginhook to execute commands with the same behavior as bash scripts. |
I tried to implement a "shell" command in dokku, which would give access to a shell running as the dokku user via ssh. |
@mikexstudios @plietar Do you think you can put together a small gist with a plugin and a script that shows the problem in an easy producible way? |
/cc @unclejack |
I will try to get to this tomorrow or over the weekend. Thanks. |
I've looked into this earlier this week. There are a few issues and the simplest solution will be to move the run command to the top level dokku shell script to avoid having to go through pluginhook. I haven't discovered any bugs or problems in docker. The main problems and questions are:
I'm commenting so @progrium can keep track of these issues & concerns, as requested. |
resolves dokku#236, adding support for dokku run commands to be interactive
Currently the dokku command supports 'run' to allow executing a command within the docker container of an app; this is useful for things like Django's manage.py syncdb.... but it doesn't allow any interactivity, whereas Heroku allows interactive commands in its equivalent. This is useful for responding to prompts from a command, or launching a shell within the container.
The text was updated successfully, but these errors were encountered: