Skip to content
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

Feature request: sh access #35

Open
sarink opened this issue Jul 1, 2019 · 8 comments
Open

Feature request: sh access #35

sarink opened this issue Jul 1, 2019 · 8 comments

Comments

@sarink
Copy link

sarink commented Jul 1, 2019

Next to the tabs Logs | Stats | Container Config | Top I was thinking it would be pretty neat to have one called shell, when you click it it could execute docker-compose <container> exec sh and that box can become a repl?

BTW, thank you for this project 🎊 I've been using it for a day and it's amazing!

@mudasar187
Copy link

Next to the tabs Logs | Stats | Container Config | Top I was thinking it would be pretty neat to have one called shell, when you click it it could execute docker-compose <container> exec sh and that box can become a repl?

BTW, thank you for this project 🎊 I've been using it for a day and it's amazing!

That would be amazing to have! :D

@jesseduffield
Copy link
Owner

currently if you hit 'c' it brings up custom commands, of which one is the sh command, however that switches you into a fullscreen bash prompt. I really would love to have stuff like bash run in the main panel on the right, but it's actually quite a tricky problem to solve, given that you basically need to get a pseudo terminal and then interpret all of the ansi escape codes in order to render the ascii characters in the panel. But it is probably top of my long-term priorities after supporting podman

@markphip
Copy link

markphip commented Jul 2, 2019

currently if you hit 'c' it brings up custom commands, of which one is the sh command, however that switches you into a fullscreen bash prompt. I really would love to have stuff like bash run in the main panel on the right, but it's actually quite a tricky problem to solve, given that you basically need to get a pseudo terminal and then interpret all of the ansi escape codes in order to render the ascii characters in the panel. But it is probably top of my long-term priorities after supporting podman

FWIW, this works pretty well. Might just be nice if there were a direct shortcut for this specific option (to get a shell)? This is not bad at all though as is.

@jesseduffield
Copy link
Owner

@markphip I've made an issue for this #101. I'm aware that it's not strictly necessary for this thing to be a custom command, though I think it's a good basis for showing users how they can configure this stuff themselves, by setting some exemplar defaults

@markphip
Copy link

markphip commented Jul 5, 2019

Makes sense. I was mainly commenting on the shell behavior though. I find what you are currently doing works pretty well in practice.

@jesseduffield
Copy link
Owner

good to hear :)

@gggeek
Copy link
Contributor

gggeek commented Dec 22, 2019

Btw: I tried getting shell access into the lazydocker container itself, and it failed with error message:

OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: "/bin/sh": stat /bin/sh: no such file or directory"

It seems to me an useful feature to be able to drop to a shell into the lazydocker container, to be able to snoop around, learn and troubleshoot. Shall I open a separate bug/feature request ?

@jesseduffield
Copy link
Owner

@gggeek sounds like /bin/sh isn't actually a program defined in your container. Not sure how best to get around that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants