dry icon indicating copy to clipboard operation
dry copied to clipboard

Feature request: docker exec

Open benton opened this issue 8 years ago • 8 comments

Hey, @moncho...

Terrific work. This tool performs basic container operations very well for me, on both OS X and linux.

Would it be difficult to add the ability to run a command inside the selected container, with docker exec, and to display the resulting STDOUT/STDERR?

How about if that command were something fully-interactive, like /bin/bash? Could you start an interactive session, and then return to the previous dry screen on exit?

If this latter feature were in place, I'd consider using dry binary as an "unprivileged" $SHELL in /etc/passwd on the docker host. Users set up that way would then be able to fully manage containers, but not the host.

benton avatar Aug 04 '16 18:08 benton

Thanks @benton, glad that you like the tool :)

It should be possible but it wont be fast to implement. Since it is a quite useful feature, I will start working on it.

Using dry as an unprivileged $SHELL is a great idea that might make the tool much more useful, thanks!!

moncho avatar Aug 06 '16 08:08 moncho

I don't believe that dry should handle exec. I know that sometimes this could be boring putting all that arguments to exec a little command and stuff. But the way i see this could be handled by an virtual environment technique. Dry should be... well, dry!

ghost avatar Aug 13 '16 02:08 ghost

So, dryness is a nice feature now? :)

In general, I kind of have the same view on this as you, @vyscond. For anything that can be done with docker CLI and it does not become repetitive, dry does not add a lot of value.

But I think that having the ability to exec a command on a container from the tool is quite handy even if the official alternative works well. And it becomes much more valuable with proposal from @benton.

Having a user that can login into a machine running a Docker and just interact with containers, gives a new perspective to the tool.

moncho avatar Aug 17 '16 12:08 moncho

@moncho maybe what could be really useful is to be able to launch ps -aux from the container. Like an process status monitor inception man.

ghost avatar Aug 19 '16 21:08 ghost

@vyscond process information is already available on stats+top screen, or do you mean something different?

moncho avatar Aug 21 '16 22:08 moncho

my bad @moncho. this was exactly what i was talking about .-.

ghost avatar Aug 22 '16 21:08 ghost

I hope this feature is will be coming soon :)

messenger91 avatar Dec 09 '19 07:12 messenger91

This (and the other linked issues) are the only features I miss from other managers. As examples for others that can do this (if you want to crib notes) are lazydocker and dockly. I think lazydocker's implementation is better: it allows me to do things like open docker exec and the like onto a new tmux window (that feature isn't built in, but the commands are in a config file).

TheDauthi avatar Jan 04 '20 22:01 TheDauthi