lazydocker
lazydocker copied to clipboard
Hotkey for entering a running container's shell
Is your feature request related to a problem? Please describe. It is very useful to enter a running container's shell. A shortcut for this would be appreciated. I don't need this for myself as already have a workaround. I think it would be nice for others.
Describe the solution you'd like
A built-in hotkey that, when pressed on a service, enters the containers shell via docker exec.
Describe alternatives you've considered Here is what I have in my config file:
---
customCommands:
containers:
- name: shell
attach: true
command:
docker exec -it {{ .Container.ID }} sh -c 'for SH in $(echo bash sh); do if (eval $SH); then exit 0; fi; done || exit 1'
serviceNames: []
(My bash scripting skills is not something I boast about)
This way, pressing c on a running service gives me the "shell" option I can use to enter a container's shell.
Additional context
If this were to be implemented and documented, a note that the service must be configured with stdin_open and tty in order for this to work would be helpful.
@kbairak Isn't that behind the E key?
The menu states E exec shell
I hadn't discovered this before. Still, it only works on the "Standalone Containers" window, not the "Services" window.